Push blocklist generator to the branch

This commit is contained in:
Luquinhas 2024-12-08 19:51:49 -03:00
commit 424d2f13cf
5 changed files with 51 additions and 0 deletions

12
main.py Normal file
View 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')