Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Instagram Saved metadata & keywords broken ('none','null') #2911

Closed
Kilobyte3189 opened this issue Sep 13, 2022 · 3 comments
Closed

[Bug] Instagram Saved metadata & keywords broken ('none','null') #2911

Kilobyte3189 opened this issue Sep 13, 2022 · 3 comments

Comments

@Kilobyte3189
Copy link

When I download my Instagram saves using the command:

gallery-dl -u USER -p PASSWRD --write-metadata https://www.instagram.com/USER/saved/

some downloaded Instagram posts have as "username", "fullname" and "num" the value 'none' as keyword in the filename, as well as 'null' as value in the metadata .json. However, when I download the posts directly from their post link instead of the USER/saved/ link, all values are correct. The posts in question are these:

https://www.instagram.com/p/CiQHpe6odOH
https://www.instagram.com/p/CiKvW_xhAp8
https://www.instagram.com/p/CiIQndOBXjA

Filename output "{username}[...]{num}.{extension}":

*/archive-instagram/None_2022-09-05_14-52-00_None.jpg
*/archive-instagram/None_2022-09-08_16-07-33_None.jpg
*/archive-instagram/None_2022-09-06_13-59-06_None.jpg
*/archive-instagram/None_2022-09-08_15-22-03_None.jpg

Metadata output:

"username": null,
"fullname": null,
[...]

Debug:

[USER@fedora ~]$ gallery-dl --verbose
[gallery-dl][debug] Version 1.23.0
[gallery-dl][debug] Python 3.10.6 - Linux-5.19.8-200.fc36.x86_64-x86_64-with-glibc2.35
[gallery-dl][debug] requests 2.27.1 - urllib3 1.26.8
usage: gallery-dl [OPTION]... URL...

Complete Instagram config.json:

"base-directory": "/home/USER/Downloads/archive-instagram",
"directory": [""],
"filename": "{username}_{date:%Y-%m-%d_%H-%M-%S}_{num}.{extension}"
@Kilobyte3189 Kilobyte3189 changed the title Instagram Saved metadata & keywords broken ('none','null') [Bug] Instagram Saved metadata & keywords broken ('none','null') Sep 13, 2022
@mikf
Copy link
Owner

mikf commented Sep 18, 2022

This is a known issue, but there isn't really a viable fix.

Different API endpoints provide different metadata, and the endpoint for saved posts does not provide anything that could be used as username or fullname.

The endpoint for single posts would provide all the needed data (as well as full resolution images #2666), but doing an extra API call per post is basically impossible with IG's current rate limit and bot detection. It would most likely just get your account banned.

@Kilobyte3189
Copy link
Author

Thank you.

mikf added a commit that referenced this issue Sep 21, 2022
provides 'username' and 'fullname'
as well as higher-quality images
@mikf
Copy link
Owner

mikf commented Sep 21, 2022

Good news! I took another look at what IG is currently using in terms of HTTP headers (3dacfb3) and API endpoints, and it is now using a REST API endpoint for saved posts (6737499), meaning not only do those now have a full set of metadata entries (username, fullname, etc), they also have a higher quality/resolution than before.

@mikf mikf closed this as completed Sep 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants