Greasy Fork is available in English.

(Deprecated) Instagram Source Opener

Open the original source of an IG post, story or profile picture

< Σχολιασμός για τον κώδικα (Deprecated) Instagram Source Opener

Αναφορά: Καλός - ο κώδικας λειτουργεί

§
Δημοσιεύτηκε: 31/10/2020

story photos not in full size. seems like IG urls output only square format photos. url needs to be cleaned

§
Δημοσιεύτηκε: 31/10/2020

fixed it with this code (get the biggest from srcset instead of src file)


var srcset = image.getAttribute("srcset");
var srcset_arr=srcset.split('w,');
for(var key in srcset_arr){ //loop array
if(key==0){ //find first element
imageSource=(srcset_arr[key]).split(' ')[0]; //first element of sub array
}
}

jomifepeΔημιουργός
§
Δημοσιεύτηκε: 01/11/2020

Hey, using just src seems to work for me, but your suggestion is good and adds reliability, so thanks for that. I'm changing the script to use srcset first.

jomifepeΔημιουργός
§
Δημοσιεύτηκε: 01/11/2020

Updated

§
Δημοσιεύτηκε: 02/11/2020

Thanks for adding this. With your version I only got a square format photo (750x750) and not the full width one.
Guess instagram is changing again and again.

jomifepeΔημιουργός
§
Δημοσιεύτηκε: 03/11/2020

So you're getting a bigger image with your code?

§
Δημοσιεύτηκε: 03/11/2020

Thats what I tried to explain :)

srcset delivers full widht/height picture
src only a square format picture

jomifepeΔημιουργός
§
Δημοσιεύτηκε: 03/11/2020
Επεξεργάστηκε: 03/11/2020

I understood that, I'm asking if you still get better results with your code with the new version, because I change it to find the highest image available in the srcset...

§
Δημοσιεύτηκε: 04/11/2020

Your code works fine :)

Δημοσίευση απάντησης

Συνδεθείτε για να δημοσιεύσετε μια απάντηση.