Merge pull request #485 from cyian-1756/ig-403

IG ripper now uses display_url when downloading images
This commit is contained in:
cyian-1756 2018-03-23 23:40:11 -04:00 committed by GitHub
commit 8f9b0a7dc7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -284,9 +284,9 @@ public class InstagramRipper extends AbstractHTMLRipper {
if (imageURLs.size() == 0) { if (imageURLs.size() == 0) {
// We add this one item to the array because either wise // We add this one item to the array because either wise
// the ripper will error out because we returned an empty array // the ripper will error out because we returned an empty array
imageURLs.add(getOriginalUrl(data.getString("thumbnail_src"))); imageURLs.add(getOriginalUrl(data.getString("display_url")));
} }
addURLToDownload(new URL(getOriginalUrl(data.getString("thumbnail_src"))), image_date); addURLToDownload(new URL(data.getString("display_url")), image_date);
} else { } else {
if (!Utils.getConfigBoolean("instagram.download_images_only", false)) { if (!Utils.getConfigBoolean("instagram.download_images_only", false)) {
addURLToDownload(new URL(getVideoFromPage(data.getString("shortcode"))), image_date); addURLToDownload(new URL(getVideoFromPage(data.getString("shortcode"))), image_date);