mirror of
https://github.com/RipMeApp/ripme.git
synced 2025-08-17 19:26:34 +02:00
Instagram: [standard_resolution] is not a JSONObject.
Improvement after feedback
This commit is contained in:
committed by
metaprime
parent
7587961e90
commit
0c995f67f0
@@ -137,13 +137,14 @@ public class InstagramRipper extends AbstractJSONRipper {
|
||||
|
||||
private String getMedia(JSONObject data) {
|
||||
String imageURL = "";
|
||||
JSONObject mediaObject;
|
||||
if (data.has("videos")) {
|
||||
JSONObject videosObject = data.getJSONObject("videos");
|
||||
mediaObject = data.getJSONObject("videos");
|
||||
if (!videosObject.isNull("standard_resolution")) {
|
||||
imageURL = videosObject.getJSONObject("standard_resolution").getString("url");
|
||||
}
|
||||
} else if (data.has("images")) {
|
||||
JSONObject imagesObject = data.getJSONObject("images");
|
||||
mediaObject = data.getJSONObject("images");
|
||||
if (!imagesObject.isNull("standard_resolution")) {
|
||||
imageURL = imagesObject.getJSONObject("standard_resolution").getString("url");
|
||||
}
|
||||
|
Reference in New Issue
Block a user