mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-14 07:04:27 -04:00
feat: Add warc to list and limit check to succeeded archive results
This commit is contained in:
parent
33182fd53c
commit
71655220ad
1 changed files with 6 additions and 2 deletions
|
@ -20,17 +20,21 @@ def get_icons(snapshot: Snapshot) -> str:
|
||||||
"archive_org": "🏛",
|
"archive_org": "🏛",
|
||||||
"readability": "🆁",
|
"readability": "🆁",
|
||||||
"mercury": "🅼",
|
"mercury": "🅼",
|
||||||
|
"warc": "📦"
|
||||||
}
|
}
|
||||||
exclude = ["favicon"]
|
exclude = ["favicon"]
|
||||||
# Missing specific entry for WARC
|
# Missing specific entry for WARC
|
||||||
|
|
||||||
|
|
||||||
for extractor in EXTRACTORS:
|
for extractor in EXTRACTORS:
|
||||||
result = archive_results.filter(extractor=extractor[0])
|
result = archive_results.filter(extractor=extractor[0], status="succeeded")
|
||||||
try:
|
try:
|
||||||
if extractor[0] not in exclude:
|
if extractor[0] not in exclude:
|
||||||
output += output_template.format(link.archive_path, canon[f"{extractor[0]}_path"],
|
output += output_template.format(link.archive_path, canon[f"{extractor[0]}_path"],
|
||||||
result.exists(), extractor[0], icons.get(extractor[0], "?"))
|
result.exists(), extractor[0], icons.get(extractor[0], "?"))
|
||||||
|
if extractor[0] == "wget":
|
||||||
|
extractor = "warc"
|
||||||
|
output += output_template.format(link.archive_path, canon[f"{extractor}_path"],
|
||||||
|
result.exists(), extractor, icons.get(extractor, "?"))
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(e)
|
print(e)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue