Fixing anoni-ib; pass referer when downloading images
This commit is contained in:
parent
27bda1bc9f
commit
e6f41d5047
@ -4,6 +4,7 @@ import java.io.IOException;
|
|||||||
import java.net.MalformedURLException;
|
import java.net.MalformedURLException;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
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.AbstractHTMLRipper;
|
||||||
import com.rarchives.ripme.ripper.rippers.ripperhelpers.ChanSite;
|
import com.rarchives.ripme.ripper.rippers.ripperhelpers.ChanSite;
|
||||||
import com.rarchives.ripme.utils.Http;
|
import com.rarchives.ripme.utils.Http;
|
||||||
import java.util.Arrays;
|
|
||||||
|
|
||||||
public class ChanRipper extends AbstractHTMLRipper {
|
public class ChanRipper extends AbstractHTMLRipper {
|
||||||
|
|
||||||
@ -157,6 +157,6 @@ public class ChanRipper extends AbstractHTMLRipper {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void downloadURL(URL url, int index) {
|
public void downloadURL(URL url, int index) {
|
||||||
addURLToDownload(url, getPrefix(index));
|
addURLToDownload(url, getPrefix(index), "", this.url.toString(), null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -38,7 +38,7 @@ public class VidmeRipper extends AbstractHTMLRipper {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<String> getURLsFromPage(Document page) {
|
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")){
|
for(Element elem : page.select("a.js-download-video-link")){
|
||||||
String link = StringEscapeUtils.unescapeHtml(elem.attr("data-href").toString());
|
String link = StringEscapeUtils.unescapeHtml(elem.attr("data-href").toString());
|
||||||
result.add(link);
|
result.add(link);
|
||||||
|
Loading…
Reference in New Issue
Block a user