mirror of
https://github.com/RipMeApp/ripme.git
synced 2025-04-22 12:42:02 +02:00
Now sends a referrer when fetching first page
This commit is contained in:
parent
6128862fbf
commit
1d600e5a31
@ -25,6 +25,7 @@ public class GfycatRipper extends AbstractHTMLRipper {
|
||||
String username = "";
|
||||
String cursor = "";
|
||||
String count = "30";
|
||||
String REFERRER = "www.reddit.com";
|
||||
|
||||
|
||||
|
||||
@ -64,10 +65,10 @@ public class GfycatRipper extends AbstractHTMLRipper {
|
||||
@Override
|
||||
public Document getFirstPage() throws IOException {
|
||||
if (!isProfile()) {
|
||||
return Http.url(url).get();
|
||||
return Http.url(url).referrer(REFERRER).get();
|
||||
} else {
|
||||
username = getGID(url);
|
||||
return Http.url(new URL("https://api.gfycat.com/v1/users/" + username + "/gfycats")).ignoreContentType().get();
|
||||
return Http.url(new URL("https://api.gfycat.com/v1/users/" + username + "/gfycats")).referrer((REFERRER)).ignoreContentType().get();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user