mirror of
https://github.com/norohind/jubilant-system.git
synced 2025-04-12 04:40:02 +03:00
add handling no proxies.json file, add proxies.json to .gitignore
This commit is contained in:
parent
5986a78c46
commit
d90db836ec
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,3 +3,4 @@
|
||||
*.csv
|
||||
venv
|
||||
__pycache__
|
||||
proxies.json
|
||||
|
6
utils.py
6
utils.py
@ -18,7 +18,11 @@ NEWS_ENDPOINT = 'news/list'
|
||||
|
||||
# proxy: last request time
|
||||
# ssh -C2 -T -n -N -D 2081 patagonia
|
||||
PROXIES_DICT: list[dict] = json.load(open('proxies.json', 'r'))
|
||||
try:
|
||||
PROXIES_DICT: list[dict] = json.load(open('proxies.json', 'r'))
|
||||
|
||||
except FileNotFoundError:
|
||||
PROXIES_DICT: list[dict] = [{'url': None, 'last_try': 0}]
|
||||
|
||||
|
||||
class FAPIDownForMaintenance(Exception):
|
||||
|
Loading…
x
Reference in New Issue
Block a user