Fixing anoni-ib; pass referer when downloading images

This commit is contained in:
4pr0n 2015-01-10 15:39:18 -08:00
parent 27bda1bc9f
commit e6f41d5047
2 changed files with 3 additions and 3 deletions

View File

@ -4,6 +4,7 @@ import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@ -14,7 +15,6 @@ import org.jsoup.nodes.Element;
import com.rarchives.ripme.ripper.AbstractHTMLRipper;
import com.rarchives.ripme.ripper.rippers.ripperhelpers.ChanSite;
import com.rarchives.ripme.utils.Http;
import java.util.Arrays;
public class ChanRipper extends AbstractHTMLRipper {
@ -157,6 +157,6 @@ public class ChanRipper extends AbstractHTMLRipper {
@Override
public void downloadURL(URL url, int index) {
addURLToDownload(url, getPrefix(index));
addURLToDownload(url, getPrefix(index), "", this.url.toString(), null);
}
}

View File

@ -38,7 +38,7 @@ public class VidmeRipper extends AbstractHTMLRipper {
@Override
public List<String> getURLsFromPage(Document page) {
List<String> result = new LinkedList<>();
List<String> result = new LinkedList<String>();
for(Element elem : page.select("a.js-download-video-link")){
String link = StringEscapeUtils.unescapeHtml(elem.attr("data-href").toString());
result.add(link);