mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-17 16:44:26 -04:00
fix abid calculation
This commit is contained in:
parent
fdf6f465db
commit
a1afd0211f
5 changed files with 14 additions and 10 deletions
|
@ -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')
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue