Skip to content

Commit

Permalink
adjusted for new tldextract version
Browse files Browse the repository at this point in the history
  • Loading branch information
thewhiteh4t committed Oct 19, 2023
1 parent 10d82c3 commit 93f4182
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion modules/crawler.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,10 @@ def crawler(target, output, data):
base_url = f'{protocol}://{temp_tgt}'
else:
ext = tldextract.extract(target)
hostname = '.'.join(part for part in ext if part)
if ext.subdomain:
hostname = f'{ext.subdomain}.{ext.domain}.{ext.suffix}'
else:
hostname = ext.registered_domain
base_url = f'{protocol}://{hostname}'
r_url = f'{base_url}/robots.txt'
sm_url = f'{base_url}/sitemap.xml'
Expand Down

0 comments on commit 93f4182

Please sign in to comment.