Repository navigation
Conversation
Prevents module build outputs (e.g. androidApp/build) from showing up as untracked files.
Ksoup is a KMP-compatible Jsoup port, preparing HTML parsing for a future multiplatform split.
Update imports and parse calls across HTML providers, and replace nodeValue() with TextNode.text() where Ksoup's Node API differs.
Each Ksoup-backed search provider and the Torznab XML parsers are exercised through their public API with captured (or, where blocked/NSFW, structure- faithful hand-written) fixtures. The same suite passes unchanged against the pre-migration Jsoup implementation, demonstrating parsing parity.
This was referenced Oct 13, 2026
This branch has not been deployed
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.
Split out of #110 as requested, so the migration PR stays focused.
Summary
Offline JVM unit tests for every Ksoup-backed parser: one test class per HTML search provider (38) plus the three Torznab XML parsers. 199 tests in total; run them with
./gradlew :app:testDebugUnitTest.mockkandkotlinx-coroutines-testas test dependencies.testing/ProviderTestSupport.ktprovidesfixture(path)andfakeNetworkClient(url to body, …), a mockk'dNetworkClientthat serves fixture bodies by exact URL and fails on any unexpected request.search,getDetails,getMagnetUri, latest/top where they parse a different page) and checks exact parsed values: names, sizes, seeders/peers, dates, categories, absolute URLs resolved from relative hrefs, decoded&in magnets, info hashes, uploader, description, poster and screenshot URLs. Each parser also gets one negative test (an unexpected page layout returns an empty list ornull).main(Jsoup) and on the Migrate HTML/XML parsing from Jsoup to fleeksoft/ksoup #110 branch (Ksoup), which shows the migration doesn't change parsing output.en_US, becauseFileSizeUtils.formatBytesformats with the default locale (1,40 GBon a German machine).Existing parser issues found while writing tests (behaviour unchanged)
The tests pin the current output and note these in comments, so fixing them will fail those assertions on purpose:
td:nth-childselectors, so the size is read from the comment count and seeders/peers end upnull.null, because the count sits inside<font>andownText()on the cell is empty.Category.Other, because the site'sLogicielsicon class isn't mapped.extractAndInferCategorykeeps only ids> 100000, so standard categories map tonull. The comparison may be inverted.Test plan
./gradlew :app:testDebugUnitTest: 199/199 pass on this branch (Ksoup)main(Jsoup): 199/199 passde_DEdefault JVM locale: 199/199 pass (the locale pin works)