fix abid calculation

This commit is contained in:
Nick Sweeting 2024-05-17 20:11:00 -07:00
parent fdf6f465db
commit a1afd0211f
No known key found for this signature in database
5 changed files with 14 additions and 10 deletions

View file

@ -108,9 +108,12 @@ def uri_hash(uri: Union[str, bytes]) -> str:
# only hash the domain part of URLs
if '://' in uri_str:
domain = urlparse(uri_str).host
if domain:
url_str = domain
try:
domain = urlparse(uri_str).netloc
if domain:
uri_str = domain
except AttributeError:
pass
uri_bytes = uri_str.encode('utf-8')