Python blocklist generator + modified .gitignore + WARN string on spamwatch.js
Signed-off-by: lucmsilva651 <lucmsilva651@gmail.com>
This commit is contained in:
parent
8fe6dce44d
commit
f0efeb63c4
5 changed files with 22 additions and 1 deletions
12
blocklist_gen/main.py
Normal file
12
blocklist_gen/main.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')
|
3
blocklist_gen/readme.txt
Normal file
3
blocklist_gen/readme.txt
Normal file
|
@ -0,0 +1,3 @@
|
|||
pip install -r requirements.txt
|
||||
echo SW_KEY=APIKEY >> config.env # put your api key here
|
||||
python main.py
|
2
blocklist_gen/requirements.txt
Normal file
2
blocklist_gen/requirements.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
python-dotenv
|
||||
spamwatch
|
Loading…
Add table
Add a link
Reference in a new issue