Skip to content

Feat/quotev - #241

Open
mrissaoussama wants to merge 8 commits into
NovelSourcery:mainfrom
mrissaoussama:feat/quotev
Open

Feat/quotev#241
mrissaoussama wants to merge 8 commits into
NovelSourcery:mainfrom
mrissaoussama:feat/quotev

Conversation

@mrissaoussama

Copy link
Copy Markdown
Contributor

Checklist:

  • Updated versionCode value in build.gradle.kts
  • Updated baseVersionCode in build.gradle.kts (if updated multisrc theme code)
  • Referenced all related issues in the PR body (e.g. "Closes #xyz")
  • Set the contentWarning configuration in build.gradle.kts appropriately
  • Have not changed source names
  • Have explicitly kept the id if a source's name or language were changed
  • Have tested the modifications by compiling and running the extension through Android Studio
  • Have removed web_hi_res_512.png when adding a new extension
  • This PR is AI-assisted, I have reviewed the changes manually and confirmed they are not slop

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant