chg:[i2p] display correctly b32 i2p addresses

This commit is contained in:
David Cruciani 2022-07-13 13:48:33 +02:00
parent e4e314e28a
commit 2160184469

View file

@ -54,6 +54,15 @@ def unpack_url(url):
to_crawl['domain'] = url_unpack['domain'] to_crawl['domain'] = url_unpack['domain']
to_crawl['domain'] = to_crawl['domain'].lower() to_crawl['domain'] = to_crawl['domain'].lower()
if to_crawl['domain'] == "b32.i2p":
try:
subdomain = url_unpack['subdomain'].decode()
except:
subdomain = url_unpack['subdomain']
if subdomain:
subdomain.lower()
to_crawl['domain'] = f"{subdomain.split('.')[-1]}.{to_crawl['domain']}"
# force lower case domain/subdomain (rfc4343) # force lower case domain/subdomain (rfc4343)
# # FIXME: # TODO: remove me # # FIXME: # TODO: remove me