block/roskomsvoboda: skip proxies with no url
This commit is contained in:
parent
b828e2bc99
commit
e163c58445
1 changed files with 3 additions and 0 deletions
|
@ -23,6 +23,9 @@ class BlockRoskomsvobodaAutomation(BaseAutomation):
|
||||||
patterns = requests.get("https://reestr.rublacklist.net/api/v2/domains/json").json()
|
patterns = requests.get("https://reestr.rublacklist.net/api/v2/domains/json").json()
|
||||||
for pattern in patterns:
|
for pattern in patterns:
|
||||||
for p in proxies:
|
for p in proxies:
|
||||||
|
if p.url is None:
|
||||||
|
# Not ready yet
|
||||||
|
continue
|
||||||
if fnmatch(p.url[len("https://"):], pattern):
|
if fnmatch(p.url[len("https://"):], pattern):
|
||||||
print(f"Found {p.url} blocked")
|
print(f"Found {p.url} blocked")
|
||||||
if not p.origin.auto_rotation:
|
if not p.origin.auto_rotation:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue