Added quickQueue support to nhentairipper
This commit is contained in:
parent
3d30df196f
commit
ffdb5fc27d
@ -26,6 +26,30 @@ public class NhentaiRipper extends AbstractHTMLRipper {
|
||||
// Thread pool for finding direct image links from "image" pages (html)
|
||||
private DownloadThreadPool nhentaiThreadPool = new DownloadThreadPool("nhentai");
|
||||
|
||||
@Override
|
||||
public boolean hasQueueSupport() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean pageContainsAlbums(URL url) {
|
||||
Pattern pa = Pattern.compile("^https?://nhentai\\.net/tag/([a-zA-Z0-9_\\-]+)/?");
|
||||
Matcher ma = pa.matcher(url.toExternalForm());
|
||||
if (ma.matches()) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getAlbumsToQueue(Document doc) {
|
||||
List<String> urlsToAddToQueue = new ArrayList<>();
|
||||
for (Element elem : doc.select("a.cover")) {
|
||||
urlsToAddToQueue.add("https://" + getDomain() + elem.attr("href"));
|
||||
}
|
||||
return urlsToAddToQueue;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DownloadThreadPool getThreadPool() {
|
||||
return nhentaiThreadPool;
|
||||
|
Loading…
Reference in New Issue
Block a user