1
0
mirror of https://github.com/RipMeApp/ripme.git synced 2025-04-21 12:12:38 +02:00

Resolve xlecx error

xlecx has changed its URL from 'xlecx.com' to 'xlecx.org'. This change modifies the ripper.java to reflect that change, and to add the required https prefix. If the https prefix is not added, the image download fails with 'no protocol'. That seems a little janky, but it was used in #120.
This commit is contained in:
Ruthalas 2020-06-27 22:15:04 -07:00
parent d2947e9e4a
commit 4f43f1e238
2 changed files with 4 additions and 4 deletions

View File

@ -56,7 +56,7 @@ public class XcartxRipper extends AbstractHTMLRipper {
for (Element image : imageElements) {
String imageUrl = image.attr("data-src");
imageURLs.add(getDomain() + imageUrl);
imageURLs.add("https://" + getDomain() + imageUrl);
}
return imageURLs;
}

View File

@ -8,7 +8,7 @@ import java.util.regex.Pattern;
public class XlecxRipper extends XcartxRipper {
private Pattern p = Pattern.compile("^https?://xlecx.com/([a-zA-Z0-9_\\-]+).html");
private Pattern p = Pattern.compile("^https?://xlecx.org/([a-zA-Z0-9_\\-]+).html");
public XlecxRipper(URL url) throws IOException {
super(url);
@ -21,7 +21,7 @@ public class XlecxRipper extends XcartxRipper {
@Override
public String getDomain() {
return "xlecx.com";
return "xlecx.org";
}
@Override
@ -30,7 +30,7 @@ public class XlecxRipper extends XcartxRipper {
if (m.matches()) {
return m.group(1);
}
throw new MalformedURLException("Expected URL format: http://xlecx.com/comic, got: " + url);
throw new MalformedURLException("Expected URL format: http://xlecx.org/comic, got: " + url);
}
}