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

instagram : terribly slow video download #1623

Closed
Vishvamitra opened this issue Jun 14, 2021 · 7 comments
Closed

instagram : terribly slow video download #1623

Vishvamitra opened this issue Jun 14, 2021 · 7 comments

Comments

@Vishvamitra
Copy link

The title basically sums up the issue: downloading even small-sized videos from instagram (around 5 MB) takes much much longer than downloading even bigger videos from other sources (the ones I tried are 4chan, twitter, pixiv and reddit).
I'm running a simple gallery-dl-based script on Linux which starts at 4 pm every day and recently the video downloads from instagram have been incredibily slow: speaking about today, for instance, the script has been running for 5 hours and half already and every time a new video is found it takes around 1-2 minutes each time to download even when the video is only 6 MB large. What I'm wondering about is if this is the standard behaviour of instagram or if there's anything I can do to improve the video download times.
My gallery-dl config file doesn't contain any instagram-specific option and I set the maximum file-size in the extractor download option as 100 MB.

@mikf
Copy link
Owner

mikf commented Jun 14, 2021

See #1580.
Basically you have to set a different User-Agent header for downloads.

@Vishvamitra
Copy link
Author

Vishvamitra commented Jun 14, 2021

@mikf Thank you very much for the quick reply. I've already checked the other issue. I won't make any changes tonight since I'm going to let the script end all the operations peacefully (even though it will take a LONG time), but I'll surely check the different user-agent option that you suggested in the other thread tomorrow. As for the user-agent, is there a command that allows me to check the user- agent I'm using right now? Second question: do you recommend wget over firefox?

@rautamiekka
Copy link
Contributor

do you recommend wget over firefox?

Why do you ask ? O.o

@Vishvamitra
Copy link
Author

Vishvamitra commented Jun 14, 2021

Why do you ask ? O.o

@rautamiekka Is my question weird?

@rautamiekka
Copy link
Contributor

More like zero context.

@Vishvamitra
Copy link
Author

@mikf Adding the -o downloader.http.headers.User-Agent=Wget/1.21.1 flag solved the issue: the videos are now getting downloaded properly. Thank you for the help! I'm going to close the thread now.

@mikf
Copy link
Owner

mikf commented Jun 15, 2021

As for the user-agent, is there a command that allows me to check the user- agent I'm using right now?

There isn't, but if you haven't configured anything yourself, it uses the UA of Firefox 78.

do you recommend wget over firefox?

Doesn't matter as long as it is not one that gets recognized as a regular browser and redirected to scontent.cdninstagram.com. Mozilla/5.0 isn't Firefox, by the way.

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

3 participants