implmented hackish workaround
This commit is contained in:
parent
de4dac516b
commit
09c9d2817a
@ -23,7 +23,6 @@ import com.rarchives.ripme.utils.Http;
|
|||||||
public class EightmusesRipper extends AbstractHTMLRipper {
|
public class EightmusesRipper extends AbstractHTMLRipper {
|
||||||
|
|
||||||
private Document albumDoc = null;
|
private Document albumDoc = null;
|
||||||
private Boolean rippingSubAlbums = false;
|
|
||||||
private Map<String,String> cookies = new HashMap<String,String>();
|
private Map<String,String> cookies = new HashMap<String,String>();
|
||||||
|
|
||||||
public EightmusesRipper(URL url) throws IOException {
|
public EightmusesRipper(URL url) throws IOException {
|
||||||
@ -84,7 +83,6 @@ public class EightmusesRipper extends AbstractHTMLRipper {
|
|||||||
Pattern p = Pattern.compile("/comix/[a-zA-Z0-9\\-_/]*/\\d+");
|
Pattern p = Pattern.compile("/comix/[a-zA-Z0-9\\-_/]*/\\d+");
|
||||||
Matcher m = p.matcher(firstImageLink);
|
Matcher m = p.matcher(firstImageLink);
|
||||||
if (!m.matches()) {
|
if (!m.matches()) {
|
||||||
rippingSubAlbums = true;
|
|
||||||
logger.info("Ripping subalbums");
|
logger.info("Ripping subalbums");
|
||||||
// Page contains subalbums (not images)
|
// Page contains subalbums (not images)
|
||||||
Elements albumElements = page.select(".page-gallery > div > div > div.gallery > a.t-hover");
|
Elements albumElements = page.select(".page-gallery > div > div > div.gallery > a.t-hover");
|
||||||
@ -127,7 +125,7 @@ public class EightmusesRipper extends AbstractHTMLRipper {
|
|||||||
x = x + 1;
|
x = x + 1;
|
||||||
}
|
}
|
||||||
// This is a hackish workaround so ripme doesn't throw a "no images found at"
|
// This is a hackish workaround so ripme doesn't throw a "no images found at"
|
||||||
imageURLs.add("http://");
|
imageURLs.add("http://DONTDOWNLOAD");
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
logger.warn("Error while loading subalbum " + subUrl, e);
|
logger.warn("Error while loading subalbum " + subUrl, e);
|
||||||
continue;
|
continue;
|
||||||
@ -179,7 +177,7 @@ public class EightmusesRipper extends AbstractHTMLRipper {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void downloadURL(URL url, int index) {
|
public void downloadURL(URL url, int index) {
|
||||||
if (!rippingSubAlbums) {
|
if (!url.equals("http://DONTDOWNLOAD")) {
|
||||||
addURLToDownload(url, getPrefix(index), "", this.url.toExternalForm(), cookies);
|
addURLToDownload(url, getPrefix(index), "", this.url.toExternalForm(), cookies);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user