mirror of
https://github.com/RipMeApp/ripme.git
synced 2025-01-16 20:28:15 +01:00
Refactor code, to not repeat the same caching, getFirstPage implementation
This commit is contained in:
parent
07b90ddb78
commit
3545cfbda9
@ -23,6 +23,7 @@ import com.rarchives.ripme.ui.RipStatusMessage.STATUS;
|
||||
import com.rarchives.ripme.utils.Utils;
|
||||
import com.rarchives.ripme.ui.MainWindow;
|
||||
import com.rarchives.ripme.ui.RipStatusMessage;
|
||||
import com.rarchives.ripme.utils.Http;
|
||||
|
||||
/**
|
||||
* Simplified ripper, designed for ripping from sites by parsing HTML.
|
||||
@ -41,7 +42,9 @@ public abstract class AbstractHTMLRipper extends AbstractRipper {
|
||||
protected abstract String getDomain();
|
||||
public abstract String getHost();
|
||||
|
||||
protected abstract Document getFirstPage() throws IOException;
|
||||
protected Document getFirstPage() throws IOException {
|
||||
return Http.url(url).get();
|
||||
}
|
||||
|
||||
protected Document getCachedFirstPage() throws IOException {
|
||||
if (cachedFirstPage == null) {
|
||||
|
@ -62,11 +62,6 @@ public class AerisdiesRipper extends AbstractHTMLRipper {
|
||||
return super.getAlbumTitle(url);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Document getFirstPage() throws IOException {
|
||||
return Http.url(url).get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getURLsFromPage(Document page) {
|
||||
List<String> imageURLs = new ArrayList<>();
|
||||
|
@ -46,12 +46,6 @@ public class AllporncomicRipper extends AbstractHTMLRipper {
|
||||
"allporncomic.com/TITLE/CHAPTER - got " + url + " instead");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Document getFirstPage() throws IOException {
|
||||
// "url" is an instance field of the superclass
|
||||
return Http.url(url).get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getURLsFromPage(Document doc) {
|
||||
List<String> result = new ArrayList<>();
|
||||
|
@ -13,7 +13,6 @@ import org.jsoup.nodes.Document;
|
||||
import org.jsoup.nodes.Element;
|
||||
|
||||
import com.rarchives.ripme.ripper.AbstractHTMLRipper;
|
||||
import com.rarchives.ripme.utils.Http;
|
||||
|
||||
public class BatoRipper extends AbstractHTMLRipper {
|
||||
|
||||
@ -94,11 +93,6 @@ public class BatoRipper extends AbstractHTMLRipper {
|
||||
return m.matches();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Document getFirstPage() throws IOException {
|
||||
// "url" is an instance field of the superclass
|
||||
return Http.url(url).get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getURLsFromPage(Document doc) {
|
||||
|
@ -47,11 +47,6 @@ public class BcfakesRipper extends AbstractHTMLRipper {
|
||||
+ " Got: " + url);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Document getFirstPage() throws IOException {
|
||||
return Http.url(url).get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Document getNextPage(Document doc) throws IOException {
|
||||
// Find next page
|
||||
|
@ -41,12 +41,6 @@ public class BlackbrickroadofozRipper extends AbstractHTMLRipper {
|
||||
"www.blackbrickroadofoz.com/comic/PAGE - got " + url + " instead");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Document getFirstPage() throws IOException {
|
||||
// "url" is an instance field of the superclass
|
||||
return Http.url(url).get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Document getNextPage(Document doc) throws IOException {
|
||||
sleep(1000);
|
||||
|
@ -2,7 +2,7 @@ package com.rarchives.ripme.ripper.rippers;
|
||||
|
||||
import com.rarchives.ripme.ripper.AbstractHTMLRipper;
|
||||
import com.rarchives.ripme.ripper.rippers.ripperhelpers.ChanSite;
|
||||
import com.rarchives.ripme.utils.Http;
|
||||
import com.rarchives.ripme.utils.Utils;
|
||||
import com.rarchives.ripme.utils.RipUtils;
|
||||
import java.io.IOException;
|
||||
import java.net.MalformedURLException;
|
||||
@ -13,7 +13,6 @@ import java.util.List;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import com.rarchives.ripme.utils.Utils;
|
||||
import org.jsoup.nodes.Document;
|
||||
import org.jsoup.nodes.Element;
|
||||
|
||||
@ -195,11 +194,9 @@ public class ChanRipper extends AbstractHTMLRipper {
|
||||
return this.url.getHost();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Document getFirstPage() throws IOException {
|
||||
return Http.url(this.url).get();
|
||||
return super.getFirstPage();
|
||||
}
|
||||
|
||||
private boolean isURLBlacklisted(String url) {
|
||||
for (String blacklist_item : url_piece_blacklist) {
|
||||
if (url.contains(blacklist_item)) {
|
||||
|
@ -23,11 +23,6 @@ public class CyberdropRipper extends AbstractHTMLRipper {
|
||||
return "cyberdrop";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Document getFirstPage() throws IOException {
|
||||
return Http.url(url).get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDomain() {
|
||||
return "cyberdrop.me";
|
||||
|
@ -41,10 +41,6 @@ public class DribbbleRipper extends AbstractHTMLRipper {
|
||||
"dribbble.com/albumid - got " + url + "instead");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Document getFirstPage() throws IOException {
|
||||
return Http.url(url).get();
|
||||
}
|
||||
@Override
|
||||
public Document getNextPage(Document doc) throws IOException {
|
||||
// Find next page
|
||||
|
@ -80,11 +80,6 @@ public class DuckmoviesRipper extends AbstractSingleFileRipper {
|
||||
return explicit_domains.contains(url_name.split("/")[2]);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Document getFirstPage() throws IOException {
|
||||
return Http.url(this.url).get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getURLsFromPage(Document doc) {
|
||||
List<String> results = new ArrayList<>();
|
||||
|
@ -42,12 +42,6 @@ public class DynastyscansRipper extends AbstractHTMLRipper {
|
||||
"dynasty-scans.com/chapters/ID - got " + url + " instead");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Document getFirstPage() throws IOException {
|
||||
// "url" is an instance field of the superclass
|
||||
return Http.url(url).get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Document getNextPage(Document doc) throws IOException {
|
||||
Element elem = doc.select("a[id=next_link]").first();
|
||||
|
@ -48,11 +48,6 @@ public class ErofusRipper extends AbstractHTMLRipper {
|
||||
return m.group(m.groupCount());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Document getFirstPage() throws IOException {
|
||||
return Http.url(url).get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getURLsFromPage(Document page) {
|
||||
LOGGER.info(page);
|
||||
|
@ -41,12 +41,6 @@ public class FemjoyhunterRipper extends AbstractHTMLRipper {
|
||||
"femjoyhunter.com/ID - got " + url + " instead");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Document getFirstPage() throws IOException {
|
||||
// "url" is an instance field of the superclass
|
||||
return Http.url(url).get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getURLsFromPage(Document doc) {
|
||||
List<String> result = new ArrayList<>();
|
||||
|
@ -46,11 +46,6 @@ public class FitnakedgirlsRipper extends AbstractHTMLRipper {
|
||||
"Expected fitnakedgirls.com gallery format: " + "fitnakedgirls.com/gallery/####" + " Got: " + url);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Document getFirstPage() throws IOException {
|
||||
return Http.url(url).get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getURLsFromPage(Document doc) {
|
||||
List<String> imageURLs = new ArrayList<>();
|
||||
|
@ -227,10 +227,6 @@ public class FlickrRipper extends AbstractHTMLRipper {
|
||||
+ " Got: " + url);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Document getFirstPage() throws IOException {
|
||||
return Http.url(url).get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getURLsFromPage(Document doc) {
|
||||
|
@ -34,10 +34,6 @@ public class FooktubeRipper extends AbstractSingleFileRipper {
|
||||
return "mulemax.com";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Document getFirstPage() throws IOException {
|
||||
return Http.url(url).get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canRip(URL url) {
|
||||
|
@ -44,12 +44,6 @@ public class FreeComicOnlineRipper extends AbstractHTMLRipper {
|
||||
"freecomiconline.me/TITLE/CHAPTER - got " + url + " instead");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Document getFirstPage() throws IOException {
|
||||
// "url" is an instance field of the superclass
|
||||
return Http.url(url).get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Document getNextPage(Document doc) throws IOException {
|
||||
String nextPage = doc.select("div.select-pagination a").get(1).attr("href");
|
||||
|
@ -40,12 +40,6 @@ public class GfycatporntubeRipper extends AbstractSingleFileRipper {
|
||||
"gfycatporntube.com/NAME - got " + url + " instead");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Document getFirstPage() throws IOException {
|
||||
// "url" is an instance field of the superclass
|
||||
return Http.url(url).get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getURLsFromPage(Document doc) {
|
||||
List<String> result = new ArrayList<>();
|
||||
|
@ -60,11 +60,6 @@ public class GirlsOfDesireRipper extends AbstractHTMLRipper {
|
||||
+ " Got: " + url);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Document getFirstPage() throws IOException {
|
||||
return Http.url(url).get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getURLsFromPage(Document doc) {
|
||||
List<String> imageURLs = new ArrayList<>();
|
||||
|
@ -50,12 +50,6 @@ public class HentaidudeRipper extends AbstractSingleFileRipper {
|
||||
"Expected hqporner URL format: " + "hentaidude.com/VIDEO - got " + url + " instead");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Document getFirstPage() throws IOException {
|
||||
// "url" is an instance field of the superclass
|
||||
return Http.url(url).get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getURLsFromPage(Document doc) {
|
||||
List<String> result = new ArrayList<>();
|
||||
|
@ -41,12 +41,6 @@ public class HentaifoxRipper extends AbstractHTMLRipper {
|
||||
"https://hentaifox.com/gallery/ID - got " + url + " instead");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Document getFirstPage() throws IOException {
|
||||
// "url" is an instance field of the superclass
|
||||
return Http.url(url).get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getURLsFromPage(Document doc) {
|
||||
LOGGER.info(doc);
|
||||
|
@ -52,13 +52,6 @@ public class HentaiimageRipper extends AbstractHTMLRipper {
|
||||
"https://hentai-image.com/image/ID - got " + url + " instead");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Document getFirstPage() throws IOException {
|
||||
// "url" is an instance field of the superclass
|
||||
return Http.url(url).get();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<String> getURLsFromPage(Document doc) {
|
||||
List<String> result = new ArrayList<>();
|
||||
|
@ -64,8 +64,7 @@ public class HqpornerRipper extends AbstractHTMLRipper {
|
||||
|
||||
@Override
|
||||
public Document getFirstPage() throws IOException {
|
||||
// "url" is an instance field of the superclass
|
||||
return Http.url(url).get();
|
||||
return super.getFirstPage();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -46,12 +46,6 @@ public class HypnohubRipper extends AbstractHTMLRipper {
|
||||
"hypnohub.net/pool/show/ID - got " + url + " instead");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Document getFirstPage() throws IOException {
|
||||
// "url" is an instance field of the superclass
|
||||
return Http.url(url).get();
|
||||
}
|
||||
|
||||
private String ripPost(String url) throws IOException {
|
||||
LOGGER.info(url);
|
||||
Document doc = Http.url(url).get();
|
||||
|
@ -56,11 +56,6 @@ public class ImagebamRipper extends AbstractHTMLRipper {
|
||||
+ " Got: " + url);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Document getFirstPage() throws IOException {
|
||||
return Http.url(url).get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Document getNextPage(Document doc) throws IOException {
|
||||
// Find next page
|
||||
|
@ -56,11 +56,6 @@ public class ImagevenueRipper extends AbstractHTMLRipper {
|
||||
+ " Got: " + url);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Document getFirstPage() throws IOException {
|
||||
return Http.url(url).get();
|
||||
}
|
||||
|
||||
public List<String> getURLsFromPage(Document doc) {
|
||||
List<String> imageURLs = new ArrayList<>();
|
||||
for (Element thumb : doc.select("a[target=_blank]")) {
|
||||
|
@ -40,10 +40,6 @@ public class ImgboxRipper extends AbstractHTMLRipper {
|
||||
"imgbox.com/g/albumid - got " + url + "instead");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Document getFirstPage() throws IOException {
|
||||
return Http.url(url).get();
|
||||
}
|
||||
@Override
|
||||
public List<String> getURLsFromPage(Document doc) {
|
||||
List<String> imageURLs = new ArrayList<>();
|
||||
|
@ -55,12 +55,6 @@ public class JabArchivesRipper extends AbstractHTMLRipper {
|
||||
"jabarchives.com/main/view/albumname - got " + url + " instead");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Document getFirstPage() throws IOException {
|
||||
// "url" is an instance field of the superclass
|
||||
return Http.url(url).get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Document getNextPage(Document doc) throws IOException {
|
||||
// Find next page
|
||||
|
@ -40,12 +40,6 @@ public class JagodibujaRipper extends AbstractHTMLRipper {
|
||||
throw new MalformedURLException("Expected jagodibuja.com gallery formats hwww.jagodibuja.com/Comic name/ got " + url + " instead");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Document getFirstPage() throws IOException {
|
||||
// "url" is an instance field of the superclass
|
||||
return Http.url(url).get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getURLsFromPage(Document doc) {
|
||||
List<String> result = new ArrayList<>();
|
||||
|
@ -41,13 +41,6 @@ public class KingcomixRipper extends AbstractHTMLRipper {
|
||||
"kingcomix.com/COMIX - got " + url + " instead");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Document getFirstPage() throws IOException {
|
||||
// "url" is an instance field of the superclass
|
||||
return Http.url(url).get();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<String> getURLsFromPage(Document doc) {
|
||||
List<String> result = new ArrayList<>();
|
||||
|
@ -37,10 +37,7 @@ public class LusciousRipper extends AbstractHTMLRipper {
|
||||
|
||||
@Override
|
||||
public Document getFirstPage() throws IOException {
|
||||
// "url" is an instance field of the superclass
|
||||
Document page = Http.url(url).get();
|
||||
LOGGER.info("First page is " + url);
|
||||
return page;
|
||||
return super.getFirstPage();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -48,12 +48,6 @@ public class ManganeloRipper extends AbstractHTMLRipper {
|
||||
"/manganelo.com/manga/ID - got " + url + " instead");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Document getFirstPage() throws IOException {
|
||||
// "url" is an instance field of the superclass
|
||||
return Http.url(url).get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Document getNextPage(Document doc) throws IOException {
|
||||
Element elem = doc.select("div.btn-navigation-chap > a.back").first();
|
||||
|
@ -49,11 +49,6 @@ public class MeituriRipper extends AbstractHTMLRipper {
|
||||
"Expected tujigu.com URL format: " + "tujigu.com/a/albumid/ - got " + url + "instead");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Document getFirstPage() throws IOException {
|
||||
return Http.url(url).get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getURLsFromPage(Document doc) {
|
||||
List<String> imageURLs = new ArrayList<>();
|
||||
|
@ -41,11 +41,6 @@ public class ModelxRipper extends AbstractHTMLRipper {
|
||||
throw new MalformedURLException("Expected URL format: http://www.modelx.org/[category (one or more)]/xxxxx got: " + url);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Document getFirstPage() throws IOException {
|
||||
return Http.url(url).get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getURLsFromPage(Document page) {
|
||||
List<String> result = new ArrayList<>();
|
||||
|
@ -86,8 +86,7 @@ public class MyhentaicomicsRipper extends AbstractHTMLRipper {
|
||||
|
||||
@Override
|
||||
public Document getFirstPage() throws IOException {
|
||||
// "url" is an instance field of the superclass
|
||||
return Http.url(url).get();
|
||||
return super.getFirstPage();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -40,12 +40,6 @@ public class MyhentaigalleryRipper extends AbstractHTMLRipper {
|
||||
+ "myhentaigallery.com/gallery/thumbnails/ID - got " + url + " instead");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Document getFirstPage() throws IOException {
|
||||
// "url" is an instance field of the superclass
|
||||
return Http.url(url).get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getURLsFromPage(Document doc) {
|
||||
List<String> result = new ArrayList<>();
|
||||
|
@ -41,12 +41,6 @@ public class MyreadingmangaRipper extends AbstractHTMLRipper {
|
||||
+ "myreadingmanga.info/title - got " + url + " instead");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Document getFirstPage() throws IOException {
|
||||
// "url" is an instance field of the superclass
|
||||
return Http.url(url).get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getURLsFromPage(Document doc) {
|
||||
List<String> result = new ArrayList<>();
|
||||
|
@ -79,11 +79,6 @@ public class NatalieMuRipper extends AbstractHTMLRipper {
|
||||
return this.url.getHost();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Document getFirstPage() throws IOException {
|
||||
return Http.url(this.url).get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getURLsFromPage(Document page) {
|
||||
List<String> imageURLs = new ArrayList<>();
|
||||
|
@ -29,8 +29,6 @@ public class NfsfwRipper extends AbstractHTMLRipper {
|
||||
"https?://[wm.]*nfsfw.com/gallery/v/[^/]+/(.+)$"
|
||||
);
|
||||
|
||||
// cached first page
|
||||
private Document fstPage;
|
||||
// threads pool for downloading images from image pages
|
||||
private DownloadThreadPool nfsfwThreadPool;
|
||||
|
||||
@ -49,13 +47,6 @@ public class NfsfwRipper extends AbstractHTMLRipper {
|
||||
return HOST;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Document getFirstPage() throws IOException {
|
||||
// cache the first page
|
||||
this.fstPage = Http.url(url).get();
|
||||
return fstPage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Document getNextPage(Document page) throws IOException {
|
||||
String nextURL = null;
|
||||
@ -157,9 +148,15 @@ public class NfsfwRipper extends AbstractHTMLRipper {
|
||||
|
||||
@Override
|
||||
public boolean pageContainsAlbums(URL url) {
|
||||
List<String> imageURLs = getImagePageURLs(fstPage);
|
||||
List<String> subalbumURLs = getSubalbumURLs(fstPage);
|
||||
return imageURLs.isEmpty() && !subalbumURLs.isEmpty();
|
||||
try {
|
||||
final var fstPage = getCachedFirstPage();
|
||||
List<String> imageURLs = getImagePageURLs(fstPage);
|
||||
List<String> subalbumURLs = getSubalbumURLs(fstPage);
|
||||
return imageURLs.isEmpty() && !subalbumURLs.isEmpty();
|
||||
} catch (IOException e) {
|
||||
LOGGER.error("Unable to load " + url, e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -16,8 +16,6 @@ import com.rarchives.ripme.ripper.AbstractHTMLRipper;
|
||||
import com.rarchives.ripme.utils.Http;
|
||||
|
||||
public class NudeGalsRipper extends AbstractHTMLRipper {
|
||||
// Current HTML document
|
||||
private Document albumDoc = null;
|
||||
|
||||
public NudeGalsRipper(URL url) throws IOException {
|
||||
super(url);
|
||||
@ -50,14 +48,6 @@ public class NudeGalsRipper extends AbstractHTMLRipper {
|
||||
+ " Got: " + url);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Document getFirstPage() throws IOException {
|
||||
if (albumDoc == null) {
|
||||
albumDoc = Http.url(url).get();
|
||||
}
|
||||
return albumDoc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getURLsFromPage(Document doc) {
|
||||
List<String> imageURLs = new ArrayList<>();
|
||||
@ -77,4 +67,4 @@ public class NudeGalsRipper extends AbstractHTMLRipper {
|
||||
// Send referrer when downloading images
|
||||
addURLToDownload(url, getPrefix(index), "", this.url.toExternalForm(), null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -46,12 +46,6 @@ public class OglafRipper extends AbstractHTMLRipper {
|
||||
return getDomain();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Document getFirstPage() throws IOException {
|
||||
// "url" is an instance field of the superclass
|
||||
return Http.url(url).get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Document getNextPage(Document doc) throws IOException {
|
||||
if (doc.select("div#nav > a > div#nx").first() == null) {
|
||||
|
@ -63,12 +63,6 @@ public class PichunterRipper extends AbstractHTMLRipper {
|
||||
return m.matches();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Document getFirstPage() throws IOException {
|
||||
// "url" is an instance field of the superclass
|
||||
return Http.url(url).get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Document getNextPage(Document doc) throws IOException {
|
||||
// We use comic-nav-next to the find the next page
|
||||
|
@ -51,12 +51,6 @@ public class PicstatioRipper extends AbstractHTMLRipper {
|
||||
"www.picstatio.com//ID - got " + url + " instead");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Document getFirstPage() throws IOException {
|
||||
// "url" is an instance field of the superclass
|
||||
return Http.url(url).get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Document getNextPage(Document doc) throws IOException {
|
||||
if (doc.select("a.next_page") != null) {
|
||||
|
@ -41,12 +41,6 @@ public class PorncomixRipper extends AbstractHTMLRipper {
|
||||
"porncomix.info/comic - got " + url + " instead");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Document getFirstPage() throws IOException {
|
||||
// "url" is an instance field of the superclass
|
||||
return Http.url(url).get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getURLsFromPage(Document doc) {
|
||||
List<String> result = new ArrayList<>();
|
||||
|
@ -41,12 +41,6 @@ public class PorncomixinfoRipper extends AbstractHTMLRipper {
|
||||
"porncomixinfo.net/chapter/CHAP/ID - got " + url + " instead");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Document getFirstPage() throws IOException {
|
||||
// "url" is an instance field of the superclass
|
||||
return Http.url(url).get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Document getNextPage(Document doc) throws IOException {
|
||||
// Find next page
|
||||
|
@ -41,12 +41,6 @@ public class PornpicsRipper extends AbstractHTMLRipper {
|
||||
"www.pornpics.com/galleries/ID - got " + url + " instead");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Document getFirstPage() throws IOException {
|
||||
// "url" is an instance field of the superclass
|
||||
return Http.url(url).get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getURLsFromPage(Document doc) {
|
||||
List<String> result = new ArrayList<>();
|
||||
|
@ -40,11 +40,6 @@ public class RulePornRipper extends AbstractSingleFileRipper {
|
||||
"Expected ruleporn.com URL format: " + "ruleporn.com/NAME - got " + url + " instead");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Document getFirstPage() throws IOException {
|
||||
return Http.url(url).get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getURLsFromPage(Document doc) {
|
||||
List<String> result = new ArrayList<>();
|
||||
|
@ -12,7 +12,6 @@ import org.jsoup.nodes.Document;
|
||||
import org.jsoup.nodes.Element;
|
||||
|
||||
import com.rarchives.ripme.ripper.AbstractHTMLRipper;
|
||||
import com.rarchives.ripme.utils.Http;
|
||||
|
||||
public class ShesFreakyRipper extends AbstractHTMLRipper {
|
||||
|
||||
@ -41,11 +40,6 @@ public class ShesFreakyRipper extends AbstractHTMLRipper {
|
||||
+ "shesfreaky.com/gallery/... - got " + url + "instead");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Document getFirstPage() throws IOException {
|
||||
return Http.url(url).get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getURLsFromPage(Document doc) {
|
||||
List<String> imageURLs = new ArrayList<>();
|
||||
|
@ -41,12 +41,6 @@ public class SinfestRipper extends AbstractHTMLRipper {
|
||||
"sinfest.net/view.php?date=XXXX-XX-XX/ - got " + url + " instead");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Document getFirstPage() throws IOException {
|
||||
// "url" is an instance field of the superclass
|
||||
return Http.url(url).get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Document getNextPage(Document doc) throws IOException {
|
||||
Element elem = doc.select("td.style5 > a > img").last();
|
||||
|
@ -89,11 +89,6 @@ public class SmuttyRipper extends AbstractHTMLRipper {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Document getFirstPage() throws IOException {
|
||||
// "url" is an instance field of the superclass
|
||||
return Http.url(url).get();
|
||||
}
|
||||
|
||||
public void downloadURL(URL url, int index) {
|
||||
addURLToDownload(url, getPrefix(index));
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ public class SoundgasmRipper extends AbstractHTMLRipper {
|
||||
|
||||
@Override
|
||||
public Document getFirstPage() throws IOException {
|
||||
return Http.url(url).get();
|
||||
return super.getFirstPage();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -28,11 +28,6 @@ public class SpankbangRipper extends AbstractSingleFileRipper {
|
||||
return "spankbang.com";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Document getFirstPage() throws IOException {
|
||||
return Http.url(url).get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getURLsFromPage(Document doc) {
|
||||
List<String> result = new ArrayList<>();
|
||||
|
@ -47,12 +47,6 @@ public class StaRipper extends AbstractHTMLRipper {
|
||||
"sta.sh/ALBUMID - got " + url + " instead");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Document getFirstPage() throws IOException {
|
||||
// "url" is an instance field of the superclass
|
||||
return Http.url(url).get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getURLsFromPage(Document doc) {
|
||||
List<String> result = new ArrayList<>();
|
||||
|
@ -46,11 +46,6 @@ public class TapasticRipper extends AbstractHTMLRipper {
|
||||
return "tapas";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Document getFirstPage() throws IOException {
|
||||
return Http.url(url).get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getURLsFromPage(Document page) {
|
||||
List<String> urls = new ArrayList<>();
|
||||
|
@ -34,11 +34,6 @@ public class TeenplanetRipper extends AbstractHTMLRipper {
|
||||
return HOST;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Document getFirstPage() throws IOException {
|
||||
return Http.url(url).get();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<String> getURLsFromPage(Document page) {
|
||||
List<String> imageURLs = new ArrayList<>();
|
||||
|
@ -70,12 +70,6 @@ public class ThechiveRipper extends AbstractHTMLRipper {
|
||||
+ "thechive.com/YEAR/MONTH/DAY/POSTTITLE/ OR i.thechive.com/username, got " + url + " instead.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Document getFirstPage() throws IOException {
|
||||
// "url" is an instance field of the superclass
|
||||
return Http.url(url).get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getURLsFromPage(Document doc) {
|
||||
List<String> result;
|
||||
|
@ -41,12 +41,6 @@ public class TheyiffgalleryRipper extends AbstractHTMLRipper {
|
||||
"theyiffgallery.com/index?/category/#### - got " + url + " instead");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Document getFirstPage() throws IOException {
|
||||
// "url" is an instance field of the superclass
|
||||
return Http.url(url).get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Document getNextPage(Document doc) throws IOException {
|
||||
String nextPage = doc.select("span.navPrevNext > a").attr("href");
|
||||
|
@ -45,11 +45,6 @@ public class VidbleRipper extends AbstractHTMLRipper {
|
||||
+ " Got: " + url);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Document getFirstPage() throws IOException {
|
||||
return Http.url(url).get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getURLsFromPage(Document doc) {
|
||||
return getURLsFromPageStatic(doc);
|
||||
|
@ -60,12 +60,6 @@ public class ViewcomicRipper extends AbstractHTMLRipper {
|
||||
"view-comic.com/COMIC_NAME - got " + url + " instead");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Document getFirstPage() throws IOException {
|
||||
// "url" is an instance field of the superclass
|
||||
return Http.url(url).get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getURLsFromPage(Document doc) {
|
||||
List<String> result = new ArrayList<String>();
|
||||
|
@ -215,11 +215,6 @@ public class VscoRipper extends AbstractHTMLRipper {
|
||||
return DOMAIN;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Document getFirstPage() throws IOException {
|
||||
return Http.url(url).get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void downloadURL(URL url, int index) {
|
||||
addURLToDownload(url, getPrefix(index));
|
||||
|
@ -421,10 +421,4 @@ public class WordpressComicRipper extends AbstractHTMLRipper {
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Document getFirstPage() throws IOException {
|
||||
// "url" is an instance field of the superclass
|
||||
return Http.url(url).get();
|
||||
}
|
||||
}
|
||||
|
@ -44,11 +44,6 @@ public class XcartxRipper extends AbstractHTMLRipper {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Document getFirstPage() throws IOException {
|
||||
return Http.url(url).get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getURLsFromPage(Document page) {
|
||||
List<String> imageURLs = new ArrayList<>();
|
||||
|
@ -106,13 +106,6 @@ public class XhamsterRipper extends AbstractHTMLRipper {
|
||||
return m.matches();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Document getFirstPage() throws IOException {
|
||||
// "url" is an instance field of the superclass
|
||||
return Http.url(url).get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canRip(URL url) {
|
||||
Pattern p = Pattern.compile("^https?://([\\w\\w]*\\.)?xhamster([^<]*)\\.(com|one|desi)/photos/gallery/.*?(\\d+)$");
|
||||
@ -152,6 +145,11 @@ public class XhamsterRipper extends AbstractHTMLRipper {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Document getFirstPage() throws IOException {
|
||||
return super.getFirstPage();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getURLsFromPage(Document doc) {
|
||||
LOGGER.debug("Checking for urls");
|
||||
|
@ -24,11 +24,6 @@ public class XvideosRipper extends AbstractSingleFileRipper {
|
||||
super(url);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Document getFirstPage() throws IOException {
|
||||
return Http.url(this.url).get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getHost() {
|
||||
return HOST;
|
||||
|
@ -40,11 +40,6 @@ public class YoupornRipper extends AbstractSingleFileRipper {
|
||||
return m.matches();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Document getFirstPage() throws IOException {
|
||||
return Http.url(this.url).get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getURLsFromPage(Document doc) {
|
||||
List<String> results = new ArrayList<>();
|
||||
|
@ -50,10 +50,6 @@ public class YuvutuRipper extends AbstractHTMLRipper {
|
||||
"yuvutu.com/modules.php?name=YuGallery&action=view&set_id=albumid - got " + url + "instead");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Document getFirstPage() throws IOException {
|
||||
return Http.url(url).get();
|
||||
}
|
||||
@Override
|
||||
public List<String> getURLsFromPage(Document doc) {
|
||||
List<String> imageURLs = new ArrayList<>();
|
||||
|
@ -40,12 +40,6 @@ public class tamindirmp3 extends AbstractHTMLRipper {
|
||||
"tamindir.com/files/albumid - got " + url + "instead");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Document getFirstPage() throws IOException {
|
||||
return Http.url(url).get();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getURLsFromPage(Document doc) {
|
||||
List<String> music = new ArrayList<>();
|
||||
|
Loading…
x
Reference in New Issue
Block a user