Implemented SpamWatch blocklist

This commit is contained in:
Lucas Gabriel 2024-06-02 22:01:52 +00:00
parent 1bc99afe87
commit 0cdcc28d3e
5 changed files with 46 additions and 2 deletions

12
sw_api.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')