From 73478344d8d5c6f43b55d134e727b6d8dc48452e Mon Sep 17 00:00:00 2001 From: cyian-1756 Date: Tue, 10 Apr 2018 18:28:13 -0400 Subject: [PATCH] Got getNextPage working again for tags --- .../com/rarchives/ripme/ripper/rippers/InstagramRipper.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/rarchives/ripme/ripper/rippers/InstagramRipper.java b/src/main/java/com/rarchives/ripme/ripper/rippers/InstagramRipper.java index e4e4e39f..3f1433d0 100644 --- a/src/main/java/com/rarchives/ripme/ripper/rippers/InstagramRipper.java +++ b/src/main/java/com/rarchives/ripme/ripper/rippers/InstagramRipper.java @@ -358,8 +358,10 @@ public class InstagramRipper extends AbstractHTMLRipper { if (rippingTag) { try { sleep(2500); + String vars = "{\"tag_name\":\"" + tagName + "\",\"first\":4,\"after\":\"" + nextPageID + "\"}"; + String ig_gis = getIGGis(vars); toreturn = Http.url("https://www.instagram.com/graphql/query/?query_hash=" + qHash + - "&variables={\"tag_name\":\"" + tagName + "\",\"first\":4,\"after\":\"" + nextPageID + "\"}").cookies(cookies).ignoreContentType().get(); + "&variables=" + vars).header("x-instagram-gis", ig_gis).cookies(cookies).ignoreContentType().get(); // Sleep for a while to avoid a ban logger.info(toreturn.html()); return toreturn;