@Override public List<String> getURLsFromPage(Document doc) { List<String> result = new ArrayList<>(); result.add(doc.select("source[id=mp4Source]").attr("src")); return result; }
@Override public List<String> getURLsFromPage(Document doc) { List<String> result = new ArrayList<>(); result.add(doc.select("div[id=page] > div.inner > a > img.open").attr("src")); return result; }
@Override public List<String> getURLsFromPage(Document doc) { List<String> result = new ArrayList<>(); result.add(doc.select(".video-js > source").attr("src")); return result; }
@Override public List<String> getURLsFromPage(Document doc) { List<String> result = new ArrayList<>(); result.add(doc.select("source[type=video/mp4]").attr("src")); return result; }
@Override public List<String> getURLsFromPage(Document doc) { List<String> result = new ArrayList<>(); for (Element el : doc.select("posts > post")) { String imageSource = el.select("post").attr("file_url"); result.add(imageSource); } return result; }
@Override public List<String> getURLsFromPage(Document doc) { List<String> result = new ArrayList<>(); for (Element el : doc.select("b > img#strip")) { String imageSource = el.select("img").attr("src"); result.add(imageSource); } return result; }
@Override public List<String> getURLsFromPage(Document doc) { List<String> result = new ArrayList<>(); for (Element el : doc.select("tr.a_pics > td > div > a")) { String image_URL = el.select("img").attr("src").replaceAll("_m", ""); if (image_URL.contains("http")) { result.add(image_URL); } } return result; }
@Override public List<String> getURLsFromPage(Document doc) { List<String> result = new ArrayList<>(); Elements videos = doc.select(".video-js > source"); if (videos.isEmpty()) { LOGGER.error("Could not find Embed code at " + url); return null; } result.add(videos.attr("src")); return result; }
@Override public Document getNextPage(Document doc) throws IOException { String nextPage = doc.select("span.navPrevNext > a").attr("href"); if (nextPage != null && !nextPage.isEmpty() && nextPage.contains("start-")) { return Http.url("https://theyiffgallery.com/" + nextPage).get(); } throw new IOException("No more pages"); }
private String getFullSizedImageFromURL(String fileName) { try { LOGGER.info("https://www.picstatio.com/wallpaper/" + fileName + "/download"); return Http.url("https://www.picstatio.com/wallpaper/" + fileName + "/download").get().select("p.text-center > span > a").attr("href"); } catch (IOException e) { e.printStackTrace(); return null; } }
@Override public Document getNextPage(Document doc) throws IOException { if (doc.select("a.next_page") != null) { return Http.url("https://www.picstatio.com" + doc.select("a.next_page").attr("href")).get(); } throw new IOException("No more pages"); }
@Override public Document getNextPage(Document doc) throws IOException { String nextPageURL = doc.select("div[id=page] > div.inner > a").attr("href"); int totalPages = Integer.parseInt(doc.select("div.panel > div.topbar > div > div.topbar_right > div.tbtitle > div.text").text().replace(" ⤵", "")); String[] nextPageURLSplite = nextPageURL.split("/"); // This checks if the next page number is greater than the total number of pages if (totalPages >= Integer.parseInt(nextPageURLSplite[nextPageURLSplite.length -1])) { return Http.url(nextPageURL).get(); } throw new IOException("No more pages"); }
private String ripPost(String url) throws IOException { LOGGER.info(url); Document doc = Http.url(url).get(); return "https:" + doc.select("img.image").attr("src"); }
private String getVideoFromPage(String videoID) { try { Document doc = Http.url("https://www.instagram.com/p/" + videoID).get(); return doc.select("meta[property=og:video]").attr("content"); } catch (IOException e) { LOGGER.warn("Unable to get page " + "https://www.instagram.com/p/" + videoID); } return ""; }
private String getFullSizedImage(String pageURL) { try { Document doc = Http.url(pageURL).get(); return doc.select("img#mainPhoto").attr("src"); } catch (IOException e) { return null; } }
@Override public Document getNextPage(Document doc) throws IOException { // We use comic-nav-next to the find the next page Element elem = doc.select("div.paperSpacings > ul > li.arrow").last(); if (elem != null) { String nextPage = elem.select("a").attr("href"); // Some times this returns a empty string // This for stops that return Http.url("http://www.pichunter.com" + nextPage).get(); } throw new IOException("No more pages"); }
@Override public Document getNextPage(Document page) throws IOException { if (!page.select("a.next_page").isEmpty()) { return Http.url(page.select("a.next_page").attr("abs:href")).get(); } else { throw new IOException("No more pages."); } }
@Override public Document getNextPage(Document doc) throws IOException { for (Element el : doc.select("div[id=paginator] > span")) { if (el.select("a").text().equals("next>")) { return Http.url("https://" + getDomain() + el.select("a").attr("href")).get(); } } throw new IOException("No more pages"); }
@Override public Document getFirstPage() throws IOException { // "url" is an instance field of the superclass Document tempDoc = Http.url(url).get(); String firstPageUrl = tempDoc.select("div.last > p > a.x-btn").attr("href"); // workaround for https://github.com/RipMeApp/ripme/issues/1083 if (firstPageUrl.contains("<br />")) { firstPageUrl = firstPageUrl.replaceAll("<br />", ""); } return Http.url(firstPageUrl).get(); }
@Override public Document getFirstPage() throws IOException { // "url" is an instance field of the superclass Document tempDoc = Http.url(url).get(); return Http.url("https://www.hbrowse.com" + tempDoc.select("td[id=pageTopHome] > a[title=view thumbnails (top)]").attr("href")).get(); }