Removed shared account due to privacy concerns

This commit is contained in:
cyian-1756 2018-06-08 16:52:33 -04:00
parent 5c0260fb2a
commit 1b5b58ebb4

View File

@ -29,8 +29,11 @@ public class FuraffinityRipper extends AbstractHTMLRipper {
private static final String urlBase = "https://www.furaffinity.net"; private static final String urlBase = "https://www.furaffinity.net";
private static Map<String,String> cookies = new HashMap<>(); private static Map<String,String> cookies = new HashMap<>();
static { static {
cookies.put("b", "bd5ccac8-51dc-4265-8ae1-7eac685ad667"); if (Utils.getConfigString("furaffinity.cookie.a", "") != "" && Utils.getConfigString("furaffinity.cookie.b", "") != "") {
cookies.put("a", "7c41b782-d01d-4b0e-b45b-62a4f0b2a369"); LOGGER.info("Logging in using cookies");
cookies.put("b", Utils.getConfigString("furaffinity.cookie.b", ""));
cookies.put("a", Utils.getConfigString("furaffinity.cookie.a", ""));
}
} }
// Thread pool for finding direct image links from "image" pages (html) // Thread pool for finding direct image links from "image" pages (html)
@ -91,9 +94,12 @@ public class FuraffinityRipper extends AbstractHTMLRipper {
@Override @Override
public List<String> getURLsFromPage(Document page) { public List<String> getURLsFromPage(Document page) {
List<String> urls = new ArrayList<>(); List<String> urls = new ArrayList<>();
Elements urlElements = page.select("figure.t-image > b > u > a"); Elements urlElements = page.select("figure > b > u > a");
for (Element e : urlElements) { for (Element e : urlElements) {
urls.add(getImageFromPost(urlBase + e.select("a").first().attr("href"))); String urlToAdd = getImageFromPost(urlBase + e.select("a").first().attr("href"));
if (urlToAdd.startsWith("http")) {
urls.add(urlToAdd);
}
} }
return urls; return urls;
} }