Fixed Instagram Ripper cropping issue
Merged 4pr0n/ripme#592 Fixes 4pr0n/ripme#541
This commit is contained in:
parent
cfab32d271
commit
c37a7c351a
@ -113,10 +113,10 @@ public class InstagramRipper extends AbstractJSONRipper {
|
||||
imageURL = imageURL.replaceAll("scontent.cdninstagram.com/hphotos-", "igcdn-photos-d-a.akamaihd.net/hphotos-ak-");
|
||||
imageURL = imageURL.replaceAll("s640x640/", "");
|
||||
|
||||
// it appears ig now allows higher resolution images to be uploaded but are artifically cropping the images to
|
||||
// 1080x1080 to preserve legacy support. the cropping string below isnt present on ig website and removing it
|
||||
// displays the uncropped image.
|
||||
imageURL = imageURL.replaceAll("c0.114.1080.1080/", "");
|
||||
// Instagram returns cropped images to unauthenticated applications to maintain legacy support.
|
||||
// To retrieve the uncropped image, remove this segment from the URL.
|
||||
// Segment format: cX.Y.W.H - eg: c0.134.1080.1080
|
||||
imageURL = imageURL.replaceAll("\\/c\\d{1,4}\\.\\d{1,4}\\.\\d{1,4}\\.\\d{1,4}", "");
|
||||
|
||||
imageURL = imageURL.replaceAll("\\?ig_cache_key.+$", "");
|
||||
return imageURL;
|
||||
|
Loading…
Reference in New Issue
Block a user