From 16eded172d32495e57c82520a613fd7c650cee90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Mart=C3=ADnez=20Portela?= Date: Wed, 15 Dec 2021 20:46:57 +0100 Subject: [PATCH] Handle "data:" URLs. --- macli.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/macli.py b/macli.py index 7ad906e..9424aa2 100644 --- a/macli.py +++ b/macli.py @@ -86,6 +86,9 @@ def archive(content, base_url, selector, directory, attribute, progbar): if attribute not in part.attrs: continue + if part[attribute].startswith('data:'): + continue + href = urllib.parse.urljoin(base_url, part[attribute], allow_fragments=False) progbar.next_iter(href)