Merge branch 'varaghar-master' (Merge 4pr0n/ripme#600, Fixes 4pr0n/ripme#598)
This commit is contained in:
commit
81e442eb18
@ -137,10 +137,17 @@ public class InstagramRipper extends AbstractJSONRipper {
|
||||
|
||||
private String getMedia(JSONObject data) {
|
||||
String imageURL = "";
|
||||
JSONObject mediaObject;
|
||||
if (data.has("videos")) {
|
||||
imageURL = data.getJSONObject("videos").getJSONObject("standard_resolution").getString("url");
|
||||
mediaObject = data.getJSONObject("videos");
|
||||
if (!mediaObject.isNull("standard_resolution")) {
|
||||
imageURL = mediaObject.getJSONObject("standard_resolution").getString("url");
|
||||
}
|
||||
} else if (data.has("images")) {
|
||||
imageURL = data.getJSONObject("images").getJSONObject("standard_resolution").getString("url");
|
||||
mediaObject = data.getJSONObject("images");
|
||||
if (!mediaObject.isNull("standard_resolution")) {
|
||||
imageURL = mediaObject.getJSONObject("standard_resolution").getString("url");
|
||||
}
|
||||
}
|
||||
return imageURL;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user