Fix style

This commit is contained in:
metaprime 2017-10-12 02:22:24 -07:00
parent 0c995f67f0
commit f8be5f2d74

View File

@ -140,13 +140,13 @@ public class InstagramRipper extends AbstractJSONRipper {
JSONObject mediaObject;
if (data.has("videos")) {
mediaObject = data.getJSONObject("videos");
if (!videosObject.isNull("standard_resolution")) {
imageURL = videosObject.getJSONObject("standard_resolution").getString("url");
if (!mediaObject.isNull("standard_resolution")) {
imageURL = mediaObject.getJSONObject("standard_resolution").getString("url");
}
} else if (data.has("images")) {
mediaObject = data.getJSONObject("images");
if (!imagesObject.isNull("standard_resolution")) {
imageURL = imagesObject.getJSONObject("standard_resolution").getString("url");
if (!mediaObject.isNull("standard_resolution")) {
imageURL = mediaObject.getJSONObject("standard_resolution").getString("url");
}
}
return imageURL;
@ -165,14 +165,14 @@ public class InstagramRipper extends AbstractJSONRipper {
for (int carouselIndex = 0; carouselIndex < carouselMedias.length(); carouselIndex++) {
JSONObject carouselMedia = (JSONObject) carouselMedias.get(carouselIndex);
String imageURL = getMedia(carouselMedia);
if (!"".equals(imageURL)) {
if (!imageURL.equals("")) {
imageURL = getOriginalUrl(imageURL);
imageURLs.add(imageURL);
}
}
} else {
String imageURL = getMedia(data);
if (!"".equals(imageURL)) {
if (!imageURL.equals("")) {
imageURL = getOriginalUrl(imageURL);
imageURLs.add(imageURL);
}