From 1191cf1df1bb9ae8ddc9ef93eb45c9a78fec47bf Mon Sep 17 00:00:00 2001 From: Nick Sweeting Date: Sat, 30 Mar 2019 15:04:43 -0400 Subject: [PATCH] fix importerror of scheme --- archivebox/links.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/archivebox/links.py b/archivebox/links.py index 0ec33fe5..c7747994 100644 --- a/archivebox/links.py +++ b/archivebox/links.py @@ -23,6 +23,7 @@ from html import unescape from collections import OrderedDict from util import ( + scheme, merge_links, check_link_structure, check_links_structure, @@ -52,7 +53,7 @@ def validate_links(links): def archivable_links(links): """remove chrome://, about:// or other schemed links that cant be archived""" for link in links: - scheme_is_valid = scheme(url) in ('http', 'https', 'ftp) + scheme_is_valid = scheme(link['url']) in ('http', 'https', 'ftp') not_blacklisted = (not URL_BLACKLIST.match(link['url'])) if URL_BLACKLIST else True if scheme_is_valid and not_blacklisted: yield link