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

Not able to download from instagram by tag #1666

Closed
HexHummingbird opened this issue Jul 2, 2021 · 2 comments
Closed

Not able to download from instagram by tag #1666

HexHummingbird opened this issue Jul 2, 2021 · 2 comments

Comments

@HexHummingbird
Copy link

Hello!
When I try to download posts from instagram by any tag, I get the following error:

c:\Run\GALLER~1>gallery-dl --verbose https://www.instagram.com/explore/tags/space/
gallery-dl: Version 1.18.0
gallery-dl: Python 3.7.9 - Windows-10-10.0.19041-SP0
gallery-dl: requests 2.25.1 - urllib3 1.25.11
gallery-dl: Starting DownloadJob for 'https://www.instagram.com/explore/tags/space/'
instagram: Using InstagramTagExtractor for 'https://www.instagram.com/explore/tags/space/'
instagram: Logging in as MY_EMAIL
urllib3.connectionpool: Starting new HTTPS connection (1): www.instagram.com:443
urllib3.connectionpool: https://www.instagram.com:443 "GET /accounts/login/ HTTP/1.1" 200 20190
instagram: Sleeping for 4.999 seconds
urllib3.connectionpool: https://www.instagram.com:443 "GET /data/shared_data/ HTTP/1.1" 200 8474
instagram: Sleeping for 5.0 seconds
urllib3.connectionpool: https://www.instagram.com:443 "POST /accounts/login/ajax/ HTTP/1.1" 200 110
instagram: Sleeping for 4.995 seconds
urllib3.connectionpool: https://www.instagram.com:443 "GET /explore/tags/space/ HTTP/1.1" 200 104179
instagram: An unexpected error occurred: KeyError - 'graphql'. Please run gallery-dl again with the --verbose flag, copy its output and report this issue on https://github.com/mikf/gallery-dl/issues .
instagram:
Traceback (most recent call last):
File "gallery_dl\job.py", line 75, in run
File "gallery_dl\extractor\instagram.py", line 47, in items
File "gallery_dl\extractor\instagram.py", line 493, in posts
KeyError: 'graphql'

Before running the above command, I have cleared the cache by doing
gallery-dl --clear-cache "instagram"

Part of my config file that is responsible for instagram looks like the following:
"instagram": {
"videos": false,
"username": "MY_EMAIL",
"password": "MY_PASSWORD"
}

I have already tried running gallery-dl with instagram cookies, but it didn't work.

Any idea how to fix this issue?

@mikf
Copy link
Owner

mikf commented Jul 3, 2021

There's nothing you can do to fix this. Instagram changed the way /explore/tags/…/ pages work and the code has to be updated accordingly.

@mikf mikf closed this as completed in c8e678a Jul 20, 2021
@mspiegel
Copy link

I think that fetching by tags is still not working correctly. The behavior appears to be that the first batch of downloads match the tags but then subsequent images have nothing to do with the tag. You can compare the results of visiting https://www.instagram.com/explore/tags/dogrates/ with what is downloaded using gallery-dl.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants