Skip to content

Commit

Permalink
Merge pull request RipMeApp#1316 from xarantolus/fix-instagram-ripper
Browse files Browse the repository at this point in the history
Fix Instagram ripper
  • Loading branch information
cyian-1756 authored May 22, 2019
2 parents 3cf7a27 + fe2f3d6 commit 504c982
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,14 @@ public List<String> getURLsFromJSON(JSONObject json) {

// get the rhx_gis value so we can get the next page later on
if (rhx_gis == null) {
rhx_gis = json.getString("rhx_gis");
try {
rhx_gis = json.getString("rhx_gis");
} catch (JSONException ex) {
// Instagram has removed this token, but ...
LOGGER.error("Error while getting rhx_gis: " + ex.getMessage());
//... if we set it to "", the next page can still be fetched
rhx_gis = "";
}
}
if (!url.toExternalForm().contains("/p/")) {
JSONArray datas = new JSONArray();
Expand Down

0 comments on commit 504c982

Please sign in to comment.