Handle "data:" URLs.

This commit is contained in:
Sergio Martínez Portela 2021-12-15 20:46:57 +01:00
parent 8664725c7b
commit 16eded172d

View File

@ -86,6 +86,9 @@ def archive(content, base_url, selector, directory, attribute, progbar):
if attribute not in part.attrs: if attribute not in part.attrs:
continue continue
if part[attribute].startswith('data:'):
continue
href = urllib.parse.urljoin(base_url, part[attribute], href = urllib.parse.urljoin(base_url, part[attribute],
allow_fragments=False) allow_fragments=False)
progbar.next_iter(href) progbar.next_iter(href)