mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-14 07:04:27 -04:00
Merge pull request #669 from FliegendeWurst/fix-issue-235
add command: --parser option (fixes #235)
This commit is contained in:
commit
36f0646501
6 changed files with 73 additions and 21 deletions
|
@ -568,6 +568,7 @@ def add(urls: Union[str, List[str]],
|
|||
overwrite: bool=False,
|
||||
init: bool=False,
|
||||
extractors: str="",
|
||||
parser: str="auto",
|
||||
out_dir: Path=OUTPUT_DIR) -> List[Link]:
|
||||
"""Add a new URL or list of URLs to your archive"""
|
||||
|
||||
|
@ -594,7 +595,7 @@ def add(urls: Union[str, List[str]],
|
|||
# save verbatim args to sources
|
||||
write_ahead_log = save_text_as_source('\n'.join(urls), filename='{ts}-import.txt', out_dir=out_dir)
|
||||
|
||||
new_links += parse_links_from_source(write_ahead_log, root_url=None)
|
||||
new_links += parse_links_from_source(write_ahead_log, root_url=None, parser=parser)
|
||||
|
||||
# If we're going one level deeper, download each link and look for more links
|
||||
new_links_depth = []
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue