Skip to content

Commit

Permalink
chore:checkByDomainBlacklist
Browse files Browse the repository at this point in the history
  • Loading branch information
Guovin committed Apr 7, 2024
1 parent 1a43b5f commit 612b945
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,8 @@ def checkByDomainBlacklist(url):
Check by domain blacklist
"""
domain_blacklist = [
urlparse(domain).netloc for domain in getattr(config, "domain_blacklist", [])
urlparse(domain).netloc if urlparse(domain).scheme else domain
for domain in getattr(config, "domain_blacklist", [])
]
return urlparse(url).netloc not in domain_blacklist

Expand Down

0 comments on commit 612b945

Please sign in to comment.