Merge pull request #83 from ULBAZOR/patch-2
InstagramRipper getOriginalUrl retrieving cropped images fix
This commit is contained in:
commit
e03838694a
@ -111,7 +111,20 @@ public class InstagramRipper extends AbstractJSONRipper {
|
|||||||
|
|
||||||
private String getOriginalUrl(String imageURL) {
|
private String getOriginalUrl(String imageURL) {
|
||||||
imageURL = imageURL.replaceAll("scontent.cdninstagram.com/hphotos-", "igcdn-photos-d-a.akamaihd.net/hphotos-ak-");
|
imageURL = imageURL.replaceAll("scontent.cdninstagram.com/hphotos-", "igcdn-photos-d-a.akamaihd.net/hphotos-ak-");
|
||||||
|
imageURL = imageURL.replaceAll("p150x150/", "");
|
||||||
|
imageURL = imageURL.replaceAll("p320x320/", "");
|
||||||
|
imageURL = imageURL.replaceAll("p480x480/", "");
|
||||||
|
imageURL = imageURL.replaceAll("p640x640/", "");
|
||||||
|
imageURL = imageURL.replaceAll("p720x720/", "");
|
||||||
|
imageURL = imageURL.replaceAll("p1080x1080/", "");
|
||||||
|
imageURL = imageURL.replaceAll("p2048x2048/", "");
|
||||||
|
imageURL = imageURL.replaceAll("s150x150/", "");
|
||||||
|
imageURL = imageURL.replaceAll("s320x320/", "");
|
||||||
|
imageURL = imageURL.replaceAll("s480x480/", "");
|
||||||
imageURL = imageURL.replaceAll("s640x640/", "");
|
imageURL = imageURL.replaceAll("s640x640/", "");
|
||||||
|
imageURL = imageURL.replaceAll("s720x720/", "");
|
||||||
|
imageURL = imageURL.replaceAll("s1080x1080/", "");
|
||||||
|
imageURL = imageURL.replaceAll("s2048x2048/", "");
|
||||||
|
|
||||||
// Instagram returns cropped images to unauthenticated applications to maintain legacy support.
|
// Instagram returns cropped images to unauthenticated applications to maintain legacy support.
|
||||||
// To retrieve the uncropped image, remove this segment from the URL.
|
// To retrieve the uncropped image, remove this segment from the URL.
|
||||||
|
Loading…
Reference in New Issue
Block a user