Open
Conversation
835a464 to
ff7972e
Compare
scripts/check_logos.py scans data/logos.csv for broken logo URLs and writes the dead entries to dead_logos.json. Features: - Async worker-pool (concurrency bounded, no FD exhaustion) - HEAD with automatic fallback to GET on 405 - 429 retries rescheduled via background tasks so workers never stall - Exponential backoff with Retry-After header support - --recheck: re-verify a previous dead_logos.json in place - --loop: keep re-checking until the list stabilizes - --delay: per-request throttle to reduce rate limiting - Live progress with rate and ETA, reason breakdown on completion Requires: Python 3.10+, aiohttp Also adds dead_logos*.json to .gitignore.
ff7972e to
4b54494
Compare
Author
|
example of the resulting |
Contributor
BellezaEmporium
left a comment
There was a problem hiding this comment.
I'm not against the idea, but since most of the scripts' codes are in JS (via Node), i'll see if @freearhey 's in for adding a Python script.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
scripts/check_logos.py— an async Python script that scansdata/logos.csvand identifies broken logo URLsdead_logos*.jsonto.gitignoreso output files are never accidentally committedHow it works
A logo URL is considered dead if:
Content-Typeis notimage/*429 responses are retried with exponential backoff (respects
Retry-Afterheader). HEAD requests fall back to GET automatically on 405.Usage
Output is a JSON array of dead logo entries (all original CSV fields preserved) with an added
_reasonfield explaining why the URL failed.Requires: Python 3.10+,
aiohttp