Implemented SpamWatch blocklist
This commit is contained in:
parent
1bc99afe87
commit
0cdcc28d3e
5 changed files with 46 additions and 2 deletions
12
sw_api.py
Normal file
12
sw_api.py
Normal file
|
@ -0,0 +1,12 @@
|
|||
import os
|
||||
from dotenv import load_dotenv
|
||||
import spamwatch
|
||||
|
||||
load_dotenv("config.env")
|
||||
|
||||
client = spamwatch.Client(os.getenv('SW_KEY'))
|
||||
bans = client.get_bans_min()
|
||||
|
||||
with open('sw_blocklist.txt', 'w') as file:
|
||||
for ban in bans:
|
||||
file.write(f'{ban}\n')
|
Loading…
Add table
Add a link
Reference in a new issue