Merge pull request #613 from cyian-1756/myhentaicomicsFixes

myhentaicomics ripper now requests proper url when downloading images
This commit is contained in:
cyian-1756 2018-05-25 15:57:38 -04:00 committed by GitHub
commit c3a2654cf9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -99,7 +99,7 @@ public class MyhentaicomicsRipper extends AbstractHTMLRipper {
Pattern p = Pattern.compile("/index.php/[a-zA-Z0-9_-]*\\?page=\\d"); Pattern p = Pattern.compile("/index.php/[a-zA-Z0-9_-]*\\?page=\\d");
Matcher m = p.matcher(nextPage); Matcher m = p.matcher(nextPage);
if (m.matches()) { if (m.matches()) {
nextUrl = "http://myhentaicomics.com" + m.group(0); nextUrl = "https://myhentaicomics.com" + m.group(0);
} }
if (nextUrl.equals("")) { if (nextUrl.equals("")) {
throw new IOException("No more pages"); throw new IOException("No more pages");
@ -120,7 +120,7 @@ public class MyhentaicomicsRipper extends AbstractHTMLRipper {
if (!imageSource.startsWith("http://") && !imageSource.startsWith("https://")) { if (!imageSource.startsWith("http://") && !imageSource.startsWith("https://")) {
// We replace thumbs with resizes so we can the full sized images // We replace thumbs with resizes so we can the full sized images
imageSource = imageSource.replace("thumbs", "resizes"); imageSource = imageSource.replace("thumbs", "resizes");
result.add("http://myhentaicomics.com/" + imageSource); result.add("https://myhentaicomics.com" + imageSource);
} }
} }
return result; return result;