Repository navigation
v1.13.6
Changes
Some sites answer a fetch with little more than "please use a modern browser", and until now that politely went into the cache as if it were the page. This PR treats those app shells as a failed fetch so the next backend gets a turn, and adds an AniList reader that gets anime and manga data from the site's public API instead of its client-side pages.
Highlights
- Pages that only render with JavaScript no longer come back as a useless "requires a modern browser" result; the next fetch backend is tried and nothing empty gets cached
- AniList title and character links now return the cast: each character's role, gender, age, description and voice actors
search_anilistfinds an anime or manga by title so its cast can be read in one more step, including titles typed with accents or long-vowel marks
Technical changes
App shell detection
- New
is_js_shell_page()inprompture/capabilities/challenge.py, exported fromprompture.capabilities. It looks for "needs JavaScript / a newer browser" markers in the first 1,000 characters only, so an article that mentions JavaScript further down still counts as content JinaReaderBackendandDirectBackendraiseRequestRejectedErroron a shell. The fetch chain moves to the next backend, and since failures are never cached, a shell can't be stored for a page's full lifetime
AniList reader
- New
prompture/tools/web/readers/anilist.pywithAniListReader, registered among the built-in readers after Wikipedia. It handlesanilist.coanime, manga and character URLs by ID and queries the public GraphQL API atgraphql.anilist.co. Requests always go to that fixed host; the URL only supplies the ID - Character entries include role, gender, age, a cleaned description (spoilers removed by default) and voice actors. API errors map to
RequestRejectedError/BackendUnavailableErrorso they fail over like the other readers search_anilist()is exported fromprompture.tools.webto go from a title to its page. AniList's search matches romanized titles without macrons but returns unrelated entries with them, sofold_title()strips accents from Latin letters first ("Shippūden" → "Shippuden") and the query as given is tried only when that finds nothing; marks on other scripts, such as kana dakuten, are kept- AniList results use the 1-day cache lifetime, the same as Wikipedia
- README reader lists and the cache lifetime table mention AniList