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

Unable to download single posts from instagram. #4362

Closed
furycd001 opened this issue Jul 28, 2023 · 4 comments
Closed

Unable to download single posts from instagram. #4362

furycd001 opened this issue Jul 28, 2023 · 4 comments
Labels

Comments

@furycd001
Copy link

HI Guys..

I'm currently facing an issue with gallery-dl that when I provide a profile URL to gallery-dl, it downloads the entire profile without any problems. However, when I attempt to pass a URL for a single post; it often results in the following error:

[instagram][error] HttpError: '400 Bad Request' for 'https://www.instagram.com/api/v1/media/1139205965396112794886572869044439696693203290795285138510044763746868/info/'

My config.json is configured as follows:

{
    "extractor": {
        "instagram": {
            "cookies": "/path/to/instagram_cookies.txt",
            "sessionid": "mytotallyuniquesessionid0000"
        }
    }
}

The issue I'm facing is that I don't wish to download entire profiles when I might only be interested in a single post or maybe even a few. Is there anyone who could kindly assist? Your help would be greatly appreciated, and thank you in advance for taking the time to read and respond....

@mikf
Copy link
Owner

mikf commented Jul 28, 2023

1139205965396112794886572869044439696693203290795285138510044763746868

That's a suspiciously long numeric ID.
What's the shortcode or the actual URL for this post?

Converting this number to a shortcode gives https://www.instagram.com/p/CpBaEy6o2u_a01Tq-2qyiQz8ATdSFHWm94vK3I0/, but that also doesn't work in a browser.

@mikf mikf added the site:bug label Jul 28, 2023
@furycd001
Copy link
Author

furycd001 commented Jul 28, 2023

1139205965396112794886572869044439696693203290795285138510044763746868

That's a suspiciously long numeric ID. What's the shortcode or the actual URL for this post?

Here's a full link to a post that I'm experiencing the problem with. This post gives me exactly the same error output....

https://www.instagram.com/p/ChaJ-q_odgvm0fnelsnCzIG_R-aFgRPBDfKSbk0/

I should mention that their profile is private, but I am friends with them & can see their profile just fine. This also happens with multiple other profiles as well, so it's not limited to just this one profile....

@mikf
Copy link
Owner

mikf commented Jul 31, 2023

You could try using a different API endpoint (-o api=graphql), although that will only download medium-resolution images.

Using a shorter shortcode might also somehow make it work. Maybe try https://www.instagram.com/p/ChaJ-q_odgv/ as URL instead of the full link.

@furycd001
Copy link
Author

https://www.instagram.com/p/ChaJ-q_odgv

I tried using a shorter shortcode, but it always seems to redirect me to a "Something went wrong" page. I tried changing the api point like you suggested & everything now downloads successfully. Downloading at medium-resolution isn't always the best, but at least it works. Thank you for your help :)

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

No branches or pull requests

2 participants