1
0
Fork 0
mirror of synced 2024-06-26 18:10:24 +12:00

fix icons in public index

This commit is contained in:
Nick Sweeting 2021-01-30 05:47:33 -05:00
parent 1ce0eca217
commit cc80ceb0a2

View file

@ -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"))