fix: Support for document on public instances.

pull/483/head
Raphaël Vinot 2022-08-04 21:28:47 +02:00
parent 94bae7c5e3
commit 4280a4e11f
1 changed files with 3 additions and 1 deletions

View File

@ -138,7 +138,9 @@ class AsyncCapture(AbstractManager):
url = f'http://{url}'
splitted_url = urlsplit(url)
if self.only_global_lookups:
if splitted_url.netloc:
if url.startswith('data') or url.startswith('file'):
pass
elif splitted_url.netloc:
if splitted_url.hostname and splitted_url.hostname.split('.')[-1] != 'onion':
try:
ip = socket.gethostbyname(splitted_url.hostname)