Merge pull request #535 from cdvv7788/extractors-flag

This commit is contained in:
Nick Sweeting 2020-11-13 14:53:17 -05:00 committed by GitHub
commit fdd4effc92
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 31 additions and 6 deletions

View file

@ -81,4 +81,13 @@ def test_add_updates_history_json_index(tmp_path, process, disable_extractors_di
with open(archived_item_path / "index.json", "r") as f:
output_json = json.load(f)
assert output_json["history"] != {}
assert output_json["history"] != {}
def test_extract_input_uses_only_passed_extractors(tmp_path, process):
subprocess.run(["archivebox", "add", "http://127.0.0.1:8080/static/example.com.html", "--extract", "wget"],
capture_output=True)
archived_item_path = list(tmp_path.glob('archive/**/*'))[0]
assert (archived_item_path / "warc").exists()
assert not (archived_item_path / "singlefile.html").exists()