feat: add ja.rawdevart - #660
Open
kinboy56 wants to merge 5 commits into
Open
Conversation
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.
fix #34
Summary
Implementation notes
A few site quirks that aren't obvious from the API responses and are worth a reviewer's
attention:
/spaendpoints require no special headers. The site's own scripts send aRefererand
X-Requested-With, but a direct request without either returns a byte-identical response(verified by diffing both). Plain
Request::getis used throughout; only the image requestsset a
Referer, since the CDN mirrors do require one.<img class="lazy" data-src="...">with paths relative to aserverfield the same responseprovides (plus
slavesas mirrors).abs:attribute resolution isn't used to join them,since it depends on the parsed document keeping a base url, which a
Html::parse_fragmentfragment doesn't reliably carry; the join is done by hand instead.
chapter_number, notchapter_id. The page endpoint is/spa/manga/{manga_id}/{chapter_number}; passing achapter_idthere returns a nullchapter_detail(confirmed against the live api). Chapter numbers are non-integer for roughly85% of entries in the sampled catalogue (e.g.
34.2) and were confirmed to be unique andnon-null across every chapter checked, so they're safe to use as the key.
DynamicFiltersreads the<option>markup the/spa/genre/allresponse embeds undergenreOpt, so new genres the site adds don't need asource update. The "all" default plus every id past it are validated as numeric in a test.
manga_statuscan be entirely absent from the API response, not justtrue/false.Missing status maps to
MangaStatus::Unknownrather than defaulting to "ongoing".languageis left unset on purpose. Setting it (as the previous, now-removedversion of this source did) subjects chapters to the app's chapter-language filter, which can
hide every chapter depending on the user's device settings for a single-language source. Most
existing
ja.*sources in this repo leave it unset for the same reason./g/ne854721) thatthe site's routing ignores; the api only ever wants the digits.
DeepLinkHandlerstrips theprefix and rejects anything that isn't left with a purely numeric id, and also trims query
strings / fragments first, since shared links commonly carry tracking parameters.
(
adult/hentai/loli-family tags → NSFW,ecchi→ Suggestive, otherwise Safe), since thesource itself is registered as
contains-nsfw.Test plan
cargo test --release— 9 tests, all hitting the live api (no mocked responses), covering:all 3 listings, search, filter combinations, dynamic genre filter parsing, series details
(title/cover/authors/tags/description/status), a chapter with a non-integer number round-tripped
into a page request, page list urls, deep link parsing (including tracking-parameter and
non-numeric-id variants), and a regression test against the specific series/chapter pair
originally reported as unreadable
cargo fmt --check— cleancargo clippy --release— no warningsaidoku package+aidoku verify— schema validation passes forsource.jsonandfilters.json, icon is 128×128 and fully opaqueaidoku serve— not yet done in this environmentChecklist
cargo fmthas been run before submissioncargo clippyoutputs no lint warningsstatus/content_ratingare set on series when available (statusisUnknownwhenthe api doesn't provide it, rather than guessed)
DeepLinkHandleris implemented for both series and chapter urlsDynamicFilters, kept in sync automaticallyCONTRIBUTING.md)