Skip to content

Conversation

@hu-qi
Copy link
Contributor

@hu-qi hu-qi commented Sep 2, 2025

Summary

  • Fix the "URI is not absolute" error in BooruRipper when processing gelbooru URLs
  • Replace problematic URI creation with direct string processing in getGID() method
  • Maintains compatibility with xbooru which was already working
  • Improves error logging with more context

Issue

Fixes #2115 - BooruRipper was partially not working (xbooru works, gelbooru doesn't) due to a URISyntaxException when trying to create a URI from search terms.

Root Cause

The getGID() method was trying to create a URI from search terms (like "animal_ears") using new URI(term).getPath(), which threw URISyntaxException: URI is not absolute because search terms are not valid absolute URIs.

Solution

  • Simplified the getGID() method to directly process the search term string
  • Removed the problematic URI creation logic
  • Used Utils.filesystemSafe() directly on the search term
  • Enhanced error logging with more context

Testing

  • ✅ Unit tests pass for both gelbooru and xbooru
  • ✅ Manual verification confirms both sites now work correctly
  • ✅ No regression in existing functionality

Test plan

  • Ran testGetGID - passes for both gelbooru and xbooru
  • Ran testGetDomain - passes for both sites
  • Ran testGetHost - passes for both sites
  • Created manual test program to verify fix works correctly
  • Confirmed xbooru still works as before

🤖 Generated with Claude Code

- Replace problematic URI creation in getGID() method with direct string processing
- Fixes "URISyntaxException: URI is not absolute" when processing gelbooru URLs
- Maintains compatibility with xbooru which was already working
- Improves error logging with more context

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
@soloturn soloturn merged commit fb84065 into RipMeApp:main Oct 3, 2025
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.

BooruRipper partially not working (xbooru works, gelbooru doesn't)

2 participants