mirror of
https://github.com/ArchiveBox/ArchiveBox
synced 2024-11-26 06:00:22 +00:00
fix icons in public index
This commit is contained in:
parent
1ce0eca217
commit
cc80ceb0a2
1 changed files with 8 additions and 2 deletions
|
@ -146,9 +146,15 @@ def snapshot_icons(snapshot) -> str:
|
|||
|
||||
for extractor, _ in EXTRACTORS:
|
||||
if extractor not in exclude:
|
||||
exists = extractor_items[extractor] is not None
|
||||
exists = False
|
||||
if extractor_items[extractor] is not None:
|
||||
outpath = (Path(path) / canon[f"{extractor}_path"])
|
||||
if outpath.is_dir():
|
||||
exists = any(outpath.glob('*.*'))
|
||||
elif outpath.is_file():
|
||||
exists = outpath.stat().st_size > 100
|
||||
output += format_html(output_template, path, canon[f"{extractor}_path"], str(exists),
|
||||
extractor, icons.get(extractor, "?"))
|
||||
extractor, icons.get(extractor, "?"))
|
||||
if extractor == "wget":
|
||||
# warc isn't technically it's own extractor, so we have to add it after wget
|
||||
exists = list((Path(path) / canon["warc_path"]).glob("*.warc.gz"))
|
||||
|
|
Loading…
Reference in a new issue