Skip to content

Commit fb84065

Browse files
hu-qiclaude
andauthored
Fix BooruRipper "URI is not absolute" error for gelbooru #2115 (#2147)
- 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]>
1 parent 0827cc7 commit fb84065

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/main/java/com/rarchives/ripme/ripper/rippers/BooruRipper.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,11 @@ private String getTerm(URL url) throws MalformedURLException {
9999
@Override
100100
public String getGID(URL url) throws MalformedURLException {
101101
try {
102-
return Utils.filesystemSafe(new URI(getTerm(url).replaceAll("&tags=", "")).getPath());
103-
} catch (URISyntaxException ex) {
104-
logger.error(ex);
102+
// Get the search term and make it filesystem safe
103+
String term = getTerm(url).replaceAll("&tags=", "");
104+
return Utils.filesystemSafe(term);
105+
} catch (Exception ex) {
106+
logger.error("Error getting GID from URL: " + url, ex);
105107
}
106108

107109
throw new MalformedURLException("Expected xbooru.com URL format: " + getHost() + ".com/index.php?tags=searchterm - got " + url + " instead");

0 commit comments

Comments
 (0)