Merge pull request #528 from cyian-1756/hentai2read-test-fixes

Hentai2read test fixes
This commit is contained in:
cyian-1756 2018-04-19 05:41:54 -04:00 committed by GitHub
commit 144b638f98
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -33,7 +33,7 @@ public class Hentai2readRipper extends AbstractHTMLRipper {
@Override
public String getGID(URL url) throws MalformedURLException {
Pattern p = Pattern.compile("https?://hentai2read\\.com/([a-zA-Z0-9_-]*)/\\d/?");
Pattern p = Pattern.compile("https?://hentai2read\\.com/([a-zA-Z0-9_-]*)/(\\d)?/?");
Matcher m = p.matcher(url.toExternalForm());
if (m.matches()) {
return m.group(1);

View File

@ -9,5 +9,7 @@ public class Hentai2readRipperTest extends RippersTest {
public void testHentai2readAlbum() throws IOException {
Hentai2readRipper ripper = new Hentai2readRipper(new URL("https://hentai2read.com/sm_school_memorial/"));
testRipper(ripper);
ripper = new Hentai2readRipper(new URL("https://hentai2read.com/sm_school_memorial/1/"));
testRipper(ripper);
}
}