Feat/quotev - #241
Open
mrissaoussama wants to merge 8 commits into
Open
Conversation
Quotev serves an empty body to requests missing standard browser fetch metadata headers (confirmed live); Sec-Fetch-*/Accept-Language headers fix it, no anti-bot bypass involved. Stories are split into numbered "pages", a finer unit than the author-named "chapters" shown in the page's own picker - one chapter can span several pages, so SChapter is modelled on the named chapters with their start/end page range encoded as a URL fragment, and every page in that range is fetched and concatenated for the chapter text. Browsing requires a specific leaf tag (a bare category like /stories or /stories/c/Fiction 404s to an empty listing) rather than exposing a general "everything" feed, so popular defaults to Fiction/Harem and a free-text Category filter picks any other tag.
Chapter list only ever returned 1 entry: the site has no #rselectList element, chapters actually come from a <select name=rid><option value=page> picker; switched to that selector. The last chapter's end page is now left open-ended and fetchPageText walks forward until #quizPageNext disappears, instead of guessing a wrong totalPages fallback. Browse/search pagination looped forever: requests used a 'next' query param the site ignores, so every 'page' re-fetched page 1 and kept reporting a next page. Switched to the real 'page' param (confirmed live) and derive hasNextPage from the actual 'Next page' link instead of a card-count guess. Also fixed the category browse URL, which was missing a required /c/ path segment (/stories/c/Fiction/c/<category>).
…ries DEFAULT_CATEGORY was 'Harem', a free-text tag scraped off one specific story's tag list, not a real site category (tags live at /stories/c/Fiction/<tag>, genres at /stories/c/Fiction/c/<genre> - different namespaces). Every browse request hardcoded /stories/c/Fiction/c/ in front of it, so anything that wasn't actually a Fiction subgenre 404'd into an empty result set. Replaced the single free-text filter with real Select filters built from the site's actual nav (verified live): Section (All/Fiction/Fanfiction/ Nonfiction), Genre, Media (Fanfiction-only /m/ facet), Sort (v=created/ new/users/top), and a Long-stories-only checkbox (minLen=50). Popular now maps to the site's own Popular sort instead of a made-up default category.
Quotev hosts stories in many languages; the extension logic itself is language-agnostic (no en-specific parsing), so it belongs under src/all per repo convention rather than src/en. Not yet published, so no source id preservation is needed.
Pulled the site's real filter-dialog config (BrowseFilter({...}) embedded
in the page, verified live) which exposes a language selector (lid param,
confirmed to combine with both the pretty category paths and /search/<term>)
and two genres (Vampires, Wolves) that exist as working pretty-path
categories but aren't linked from the visible nav bar.
The dialog also has a bitmask multi-category selector (cat=<n>, combinable
with cat2/xcat/xcat2), but a live combined-category request silently
dropped the cat param instead of filtering, so multi-select categories
aren't exposed here - single-category selection continues to use the
existing pretty-path Genre/Media filters.
featured, profanity/violence/mature, and a real min-length filter Pulled the full param list straight from the site's own filter-dialog JS (the BrowseFilter constructor and its G() request builder), not guesswork: xcat (exclude genre, single value - the include-side bitmask combination still isn't exposed since that wasn't confirmed to work), crossover/rp (Fanfiction-only), complete, featured, pf/vf/mf (profanity/violence/mature toggles), xs (exclude text), and minLen as a real Select of the site's own page-count thresholds instead of a single hardcoded 50+ checkbox. complete=1 and pf=0 were spot-checked live and confirmed to change the result set when appended onto the existing pretty-path URLs. mature (mf=1) mirrors the site's own flag, which it only honors for a logged-in session - this extension has no login flow, so it's exposed but may be a no-op.
…nt, strip comments
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.
Checklist:
versionCodevalue inbuild.gradle.ktsbaseVersionCodeinbuild.gradle.kts(if updated multisrc theme code)contentWarningconfiguration inbuild.gradle.ktsappropriatelyidif a source's name or language were changedweb_hi_res_512.pngwhen adding a new extension