Skip to content

Commit

Permalink
adust hitomi regex, see RipMeApp#43
Browse files Browse the repository at this point in the history
  • Loading branch information
soloturn committed Oct 14, 2023
1 parent c329343 commit 3fcad4f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ public String getDomain() {

@Override
public String getGID(URL url) throws MalformedURLException {
Pattern p = Pattern.compile("https://hitomi.la/galleries/([\\d]+).html");
Pattern p = Pattern.compile("https://hitomi.la/(cg|doujinshi|gamecg|manga)/(.+).html");
Matcher m = p.matcher(url.toExternalForm());
if (m.matches()) {
galleryId = m.group(1);
return m.group(1);
}
throw new MalformedURLException("Expected hitomi URL format: " +
"https://hitomi.la/galleries/ID.html - got " + url + " instead");
"https://hitomi.la/(cg|doujinshi|gamecg|manga)/ID.html - got " + url + " instead");
}

@Override
Expand Down

0 comments on commit 3fcad4f

Please sign in to comment.