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

Extra period/dot . at the end of filenames #10

Closed Photodeus closed 2 years ago

Photodeus commented 2 years ago

When I download any content, posts, stories etc. from Instagram on Chrome filenames are ending in a dot before the file extension, thus every file has two dots in their filenames.

Filenames look like this (cropped for anonymity)

--950610_n..jpg --transcode_output_dashinit..mp4 --7468409_n..mp4

Just happening for me or is this a bug in the script?

Chrome version 96.0.4664.110 Script version 1.9.5

Photodeus commented 2 years ago

Bug seems to stem from this line:

https://github.com/y252328/Instagram_Download_Button/blob/09181e1b5965359768a2e3ae0f9ff4dc9a78f04c/instagram-dl.user.js#L254

mediaName ends up with a trailing period (.)

y252328 commented 2 years ago

You are right and fixed in v1.9.6. Thanks.