Skip to content

Kemono ripper and danbooru fix - #2160

Merged
soloturn merged 1 commit into
RipMeApp:mainfrom
Undid-Iridium:KemonoRipper-and-Danbooru-Fix
Aug 15, 2026
Merged

soloturn merged 1 commit into
RipMeApp:mainfrom
Undid-Iridium:KemonoRipper-and-Danbooru-Fix

Conversation

@Undid-Iridium

Copy link
Copy Markdown
Contributor

Category

This change is exactly one of the following (please change [ ] to [x]) to indicate which:

  • a bug fix (Fix #...)
  • a new Ripper
  • a refactoring
  • a style change/fix
  • a new feature

Description

  1. KemonoRipper - New
  2. DanbooruRipper - Fix
  3. AbstractJsonRipper - Change to use OkHttp3

Testing

Required verification:

  • I've verified that there are no regressions in gradlew test (there are no new failures or errors) (As far as I can tell).
  • I've verified that this change works as intended.
image
  • Downloads all relevant content. (502 can occur but it retries but I can't fix slow.)
  • Downloads content from multiple pages (as necessary or appropriate).
  • Saves content at reasonable file names (e.g. page titles or content IDs) to help easily browse downloaded content.
    (I would argue it should have the name of the artist then ID but..)
  • I've verified that this change did not break existing functionality (especially in the Ripper I modified). (As far as I can tell).

Optional but recommended:

  • I've added a unit test to cover my change.

…o.cr

Adapted from PR RipMeApp#2160 (66b3469d, "Adding KemonoPartyRipper"),
rebased from that PR's stale base (predates the DownloadFileThread/AbstractRipper
thread-pool rewrite) onto today's main, where it needed no API changes -
addURLToDownload(url, prefix) and the AbstractJSONRipper template method contract
are unchanged.

kemono.su and kemono.party no longer resolve (confirmed via DNS lookup and web
search, 2026-08-15); kemono.cr is the domain the project's own status channel
currently points at. Repointed the API and CDN (c1/c3) base URLs there and
dropped the unused current_page_data field. canRip() still accepts all three
hostnames so existing links/history keep working.

Not included from RipMeApp#2160:
- The DanbooruRipper "fix": verified live that danbooru.donmai.us's posts.json
  already returns file_url for accessible posts (19/20 in a sample query); the
  one post missing it was pending/restricted and remained without a file_url
  even via the PR's proposed per-post fetch workaround. That change would have
  added an HTTP request per post for every rip without fixing the gap it
  targeted, so it's left out.
- The App.java/AbstractRipper.java/DownloadFileThread.java/History.java/
  MainWindow.java/FileFinishCallBack.java changes: an OkHttp rewrite of
  DownloadFileThread from a stale base, now fully superseded by main's own
  thread-pool/race-condition rework, plus dead code (unused FileFinishCallBack,
  a broken unused import, a commented-out history-rewrite block) not needed by
  either ripper.
- test.json/test2.json (accidentally committed fixtures) and the
  FreeComicOnlineRipperTest change (that test is already tagged flaky and
  pointed at a working URL on main, via a separate fix).

Caveat: kemono.cr itself is reachable by DNS but refused connections during
this review (the service's own status channel reports it mid-maintenance), so
this could not be exercised against a live response - only checked for
compiling against the current AbstractJSONRipper contract.

Co-authored-by: Undid Iridium <FrancisXIrizarry@gmail.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018v7wmgDn3VKQRo8hbFCR6S
@soloturn
soloturn force-pushed the KemonoRipper-and-Danbooru-Fix branch from 042c6a0 to ab70176 Compare August 15, 2026 11:46
@soloturn

Copy link
Copy Markdown
Collaborator

Reviewed and rewrote the branch (with maintainer-edit access) down to just the piece that still holds up:

Kept — KemonoPartyRipper, rebased and domain-fixed
Rebased your KemonoPartyRipper addition (from 66b3469d) onto current main. It needed no adaptation for the AbstractRipper/DownloadFileThread thread-pool rework that landed since this PR was opened — addURLToDownload(url, prefix) and the AbstractJSONRipper template methods are unchanged. What it did need: kemono.su/kemono.party no longer resolve (confirmed by DNS lookup and the site's own status channel today). Repointed the API and CDN (c1/c3) base URLs at kemono.cr, which is what's currently live; canRip() still accepts all three hostnames for old links/history. Also dropped an unused field. Caveat: kemono.cr refused connections during this review (mid-maintenance per their status page), so this is checked against the AbstractJSONRipper contract and compiles clean, but isn't live-verified against a real response yet.

Dropped — the Danbooru change
Checked live: danbooru.donmai.us/posts.json already returns file_url for accessible posts (19/20 in a sample query — the one gap was a pending/restricted post that stayed file_url-less even through the PR's proposed per-post-detail workaround). So the fix didn't close the gap it targeted, while adding an extra HTTP request per post to every rip. Current main's DanbooruRipper already skips posts missing file_url rather than erroring, which is the same practical outcome without the extra cost.

Dropped — everything else in the diff
App.java/AbstractRipper.java/DownloadFileThread.java/History.java/MainWindow.java/FileFinishCallBack.java: an OkHttp rewrite of DownloadFileThread off a since-superseded base, plus some dead code (unused FileFinishCallBack, a broken unused import, a commented-out debug block). test.json/test2.json: looked like accidentally-committed fixtures. The FreeComicOnlineRipperTest tweak: that test's already tagged flaky and pointed at a working URL on main via an unrelated fix.

Thanks for the original Kemono ripper and Danbooru investigation — kept your authorship on the surviving commit. Merging once CI is green.

@soloturn
soloturn merged commit 3810204 into RipMeApp:main Aug 15, 2026
4 checks passed
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.

2 participants