GoFileEmpty: no retries for content that exists but is empty; add tools/debug_gofile.py for raw content-API inspection

This commit is contained in:
2026-10-04 19:16:08 +02:00
parent 4f4270fd28
commit 64abd7126f
3 changed files with 81 additions and 1 deletions
+6 -1
View File
@@ -157,7 +157,7 @@ def run_gofile(
try:
files_spec = client.list_files(f.url)
if not files_spec:
raise dlph_gofile.GoFileError("no files found under URL")
raise dlph_gofile.GoFileEmpty("content exists but contains no files")
files: list[dict] = []
for relpath, name, link in files_spec:
dest = Path(args.out_dir) / "downloads" / "gofile" / relpath / name
@@ -182,6 +182,11 @@ def run_gofile(
log.error("DEAD LINK %s: %s", f.url, exc)
state.mark(f.url, status="failed", error=str(exc), files=[])
break
except dlph_gofile.GoFileEmpty as exc:
# Emptied content is stable - no retry
log.error("EMPTY CONTENT %s: %s", f.url, exc)
state.mark(f.url, status="failed", error=str(exc), files=[])
break
except dlph_gofile.GoFileAuthError as exc:
# Token may have died mid-run (rate limit); re-auth once per attempt
log.warning("Auth error for %s: %s - re-authenticating", f.url, exc)