block: match directly on url
This commit is contained in:
parent
018494bd58
commit
7747461e60
1 changed files with 2 additions and 3 deletions
|
@ -33,11 +33,10 @@ def check_blocks():
|
||||||
continue
|
continue
|
||||||
for url in results[vp]:
|
for url in results[vp]:
|
||||||
if "cloudfront.net" in url:
|
if "cloudfront.net" in url:
|
||||||
slug = url[len('https://'):][:-len('.cloudfront.net')]
|
print(f"Found {url} blocked")
|
||||||
print(f"Found {slug} blocked")
|
|
||||||
proxy = Proxy.query.filter(
|
proxy = Proxy.query.filter(
|
||||||
Proxy.provider == "cloudfront",
|
Proxy.provider == "cloudfront",
|
||||||
Proxy.slug == slug
|
Proxy.url == f"https://{url}"
|
||||||
).first()
|
).first()
|
||||||
if not proxy:
|
if not proxy:
|
||||||
print("Proxy not found")
|
print("Proxy not found")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue