1
0
mirror of https://github.com/RipMeApp/ripme.git synced 2025-08-26 15:24:51 +02:00

Hentaicafe ripper now handles urls with <br /> in them

This commit is contained in:
cyian-1756
2018-12-03 17:26:00 -05:00
parent 2adc725ac9
commit 18fe9aaea0

View File

@@ -44,7 +44,12 @@ public class HentaiCafeRipper extends AbstractHTMLRipper {
public Document getFirstPage() throws IOException {
// "url" is an instance field of the superclass
Document tempDoc = Http.url(url).get();
return Http.url(tempDoc.select("div.last > p > a.x-btn").attr("href")).get();
String firstPageUrl = tempDoc.select("div.last > p > a.x-btn").attr("href");
// workaround for https://github.com/RipMeApp/ripme/issues/1083
if (firstPageUrl.contains("<br />")) {
firstPageUrl = firstPageUrl.replaceAll("<br />", "");
}
return Http.url(firstPageUrl).get();
}
@Override