Merge pull request #595 from cyian-1756/Eightmuses.downloadQuickQ

Added quick queue support for 8muses.download
This commit is contained in:
cyian-1756 2018-05-20 13:39:36 -04:00 committed by GitHub
commit fd5ccb9849
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -160,12 +160,67 @@ public class WordpressComicRipper extends AbstractHTMLRipper {
if (spyingwithlanaMat.matches()) { if (spyingwithlanaMat.matches()) {
return true; return true;
} }
Pattern pa = Pattern.compile("^https?://8muses.download/\\?s=([a-zA-Z0-9-]*)");
Matcher ma = pa.matcher(url.toExternalForm());
if (ma.matches()) {
return true;
}
Pattern pat = Pattern.compile("https?://8muses.download/page/\\d+/\\?s=([a-zA-Z0-9-]*)");
Matcher mat = pat.matcher(url.toExternalForm());
if (mat.matches()) {
return true;
}
pat = Pattern.compile("https://8muses.download/category/([a-zA-Z0-9-]*)/?");
mat = pat.matcher(url.toExternalForm());
if (mat.matches()) {
return true;
}
} }
return false; return false;
} }
@Override
public boolean hasQueueSupport() {
return true;
}
@Override
public boolean pageContainsAlbums(URL url) {
Pattern pa = Pattern.compile("^https?://8muses.download/\\?s=([a-zA-Z0-9-]*)");
Matcher ma = pa.matcher(url.toExternalForm());
if (ma.matches()) {
return true;
}
Pattern pat = Pattern.compile("https?://8muses.download/page/\\d+/\\?s=([a-zA-Z0-9-]*)");
Matcher mat = pat.matcher(url.toExternalForm());
if (mat.matches()) {
return true;
}
pat = Pattern.compile("https://8muses.download/category/([a-zA-Z0-9-]*)/?");
mat = pat.matcher(url.toExternalForm());
if (mat.matches()) {
return true;
}
return false;
}
@Override
public List<String> getAlbumsToQueue(Document doc) {
List<String> urlsToAddToQueue = new ArrayList<>();
for (Element elem : doc.select("#post_masonry > article > div > figure > a")) {
urlsToAddToQueue.add(elem.attr("href"));
}
return urlsToAddToQueue;
}
@Override @Override
public String getAlbumTitle(URL url) throws MalformedURLException { public String getAlbumTitle(URL url) throws MalformedURLException {
Pattern totempole666Pat = Pattern.compile("(?:https?://)?(?:www\\.)?totempole666.com/comic/([a-zA-Z0-9_-]*)/?$"); Pattern totempole666Pat = Pattern.compile("(?:https?://)?(?:www\\.)?totempole666.com/comic/([a-zA-Z0-9_-]*)/?$");