Improved logging on errors for #41
This commit is contained in:
parent
0783a99110
commit
62538b8061
@ -72,8 +72,8 @@ public class EHentaiRipper extends AlbumRipper {
|
|||||||
@Override
|
@Override
|
||||||
public void rip() throws IOException {
|
public void rip() throws IOException {
|
||||||
int index = 0;
|
int index = 0;
|
||||||
logger.info(" Retrieving " + this.url.toExternalForm());
|
|
||||||
if (albumDoc == null) {
|
if (albumDoc == null) {
|
||||||
|
logger.info(" Retrieving " + this.url.toExternalForm());
|
||||||
albumDoc = Jsoup.connect(this.url.toExternalForm()).get();
|
albumDoc = Jsoup.connect(this.url.toExternalForm()).get();
|
||||||
}
|
}
|
||||||
Elements select = albumDoc.select("#gdt > .gdtm");
|
Elements select = albumDoc.select("#gdt > .gdtm");
|
||||||
@ -85,6 +85,7 @@ public class EHentaiRipper extends AlbumRipper {
|
|||||||
URL cursorUrl = new URL(href), prevUrl = null;
|
URL cursorUrl = new URL(href), prevUrl = null;
|
||||||
|
|
||||||
while (!cursorUrl.equals(prevUrl)) {
|
while (!cursorUrl.equals(prevUrl)) {
|
||||||
|
prevUrl = cursorUrl;
|
||||||
Document cursorDoc = Jsoup.connect(cursorUrl.toExternalForm())
|
Document cursorDoc = Jsoup.connect(cursorUrl.toExternalForm())
|
||||||
.userAgent(USER_AGENT)
|
.userAgent(USER_AGENT)
|
||||||
.get();
|
.get();
|
||||||
@ -92,6 +93,7 @@ public class EHentaiRipper extends AlbumRipper {
|
|||||||
Elements a = cursorDoc.select(".sni > a");
|
Elements a = cursorDoc.select(".sni > a");
|
||||||
Elements images = a.select("img");
|
Elements images = a.select("img");
|
||||||
if (images.size() == 0) {
|
if (images.size() == 0) {
|
||||||
|
logger.info("cursorDoc: " + cursorDoc.toString());
|
||||||
logger.error("No images found at " + cursorUrl);
|
logger.error("No images found at " + cursorUrl);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -122,7 +124,6 @@ public class EHentaiRipper extends AlbumRipper {
|
|||||||
addURLToDownload(new URL(imgsrc), prefix);
|
addURLToDownload(new URL(imgsrc), prefix);
|
||||||
}
|
}
|
||||||
|
|
||||||
prevUrl = cursorUrl;
|
|
||||||
String nextUrl = a.attr("href");
|
String nextUrl = a.attr("href");
|
||||||
if (nextUrl.equals("")) {
|
if (nextUrl.equals("")) {
|
||||||
logger.warn("Next page URL is empty, via " + a);
|
logger.warn("Next page URL is empty, via " + a);
|
||||||
|
Loading…
Reference in New Issue
Block a user