mirror of
https://github.com/ArchiveBox/ArchiveBox
synced 2024-11-22 20:23:12 +00:00
fix importerror of scheme
This commit is contained in:
parent
4fd04b8caa
commit
1191cf1df1
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue