y252328 / Instagram_Download_Button

Add download button to download media in the post and the story in Instagram
MIT License
236 stars 32 forks source link

Buggy behaviour with posts of multiple images/videos #13

Closed gvdvg closed 1 year ago

gvdvg commented 2 years ago

Say there are 6 images in a post, moving through and clicking the button on each image gets images 1, 2, 3, 3, 5, where clicking on the 4th gets you the 3rd again and clicking on the 6th gives you nothing, or maybe another unpredictable combination of images I hope this made sense

using Firefox 97.0.1

thanks

y252328 commented 2 years ago

I don't encounter this issue recently. Could you provide the post link?

talizea commented 2 years ago

I don't encounter this issue recently. Could you provide the post link?

Example: https://www.instagram.com/p/CdDkUbZsQQA/

Skips a few images and downloads another one twice.

JenieX commented 2 years ago

I don't encounter this issue recently. Could you provide the post link?

Example: https://www.instagram.com/p/CdDkUbZsQQA/

Skips a few images and downloads another one twice.

Was having the same issue myself, specially on my Android phone. Try this test fork, and see if it fixes your issue as well. Then y252328 can modify the code.

talizea commented 2 years ago

I don't encounter this issue recently. Could you provide the post link?

Example: instagram.com/p/CdDkUbZsQQA Skips a few images and downloads another one twice.

Was having the same issue myself, specially on my Android phone. Try this test fork, and see if it fixes your issue as well. Then y252328 can modify the code.

Got 10 different images with your fork, no duplicates, whoo! The file name format appears to be slightly different, but that's no issue for me at least.

JenieX commented 2 years ago

The file name format appears to be slightly different

const postFilenameTemplate = '%postId%-%mediaIndex%-%id%';

That is some change I made along with other, as I like it this way. Kind of how I'm used to it actually.

y252328 should feel free to modify the original code, using the same idea I have used in my fork to select the image/video list node, as they see fit.

y252328 commented 2 years ago

Hi FlowerForWar,

Thanks for your great fork! I have merged your code into master branch (commit 7d61920) and applied some modifications (please refer to commit message). Please take a look and feel free to reply to this issue or file a new issue if you have any concern, thanks.

JenieX commented 2 years ago

No problem. Thank you for this great user script as well. I'm new to Github and how things work here, if I have an issue I'll let you know.