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

Is it possible to download Instagram videos? #488

Open
artquest opened this issue Apr 12, 2023 · 4 comments
Open

Is it possible to download Instagram videos? #488

artquest opened this issue Apr 12, 2023 · 4 comments
Labels
question Further information is requested

Comments

@artquest
Copy link

artquest commented Apr 12, 2023

I tried and got an error:

{
  "shortMessage": "Command failed with exit code 1: C:\\Users\\%username%\\AppData\\Local\\Programs\\youtube-dl-gui\\resources\\app.asar.unpacked\\binaries\\yt-dlp.exe -J --flat-playlist --no-cache-dir --ignore-config --user-agent Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36 --no-check-certificate --yes-playlist https://www.instagram.com/p/CntImexBpVZ/",
  "command": "C:\\Users\\%username%\\AppData\\Local\\Programs\\youtube-dl-gui\\resources\\app.asar.unpacked\\binaries\\yt-dlp.exe -J --flat-playlist --no-cache-dir --ignore-config --user-agent Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36 --no-check-certificate --yes-playlist https://www.instagram.com/p/CntImexBpVZ/",
  "exitCode": 1,
  "stdout": "null",
  "stderr": "WARNING: [Instagram] CntImexBpVZ: No csrf token set by Instagram API\nWARNING: [Instagram] CntImexBpVZ: General metadata extraction failed (some metadata might be missing).\nERROR: [Instagram] CntImexBpVZ: Unable to download webpage: <urlopen error [Errno 11002] getaddrinfo failed> (caused by URLError(gaierror(11002, 'getaddrinfo failed')))",
  "failed": true,
  "timedOut": false,
  "isCanceled": false,
  "killed": false
}
@artquest artquest added the question Further information is requested label Apr 12, 2023
@StefanLobbenmeier
Copy link
Contributor

yt-dlp (which is the underlying downloader this project uses) supports it. Can you check that you are using the latest version of it? Not sure if you applied it manually, but maybe some time has passed since then.

image

@artquest
Copy link
Author

artquest commented Apr 16, 2023

Hi,
I have version 2023.3.4.0, and if I get it right, the Downloader updates yt-dlp automatically (I see the updating regularly in its address bar).
About Instagram, it's blocked by Russian government (and I'm in Russia), so I can connect to it only through a proxy and additionally using some "hacks" in the browser.
I tried to use some other free proxy inside the Downloader, and it does connect (I tested some YouTube videos), but again failed on Instagram, but with a new error. If I get it right, a cookie or credentials need to be passed to yt-dlp.

{
  "shortMessage": "Command failed with exit code 1: C:\\Users\\%username%\\AppData\\Local\\Programs\\youtube-dl-gui\\resources\\app.asar.unpacked\\binaries\\yt-dlp.exe -J --flat-playlist --no-cache-dir --ignore-config --user-agent Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.82 Safari/537.36 --proxy https://8.219.176.202:8080 --no-check-certificate --yes-playlist https://www.instagram.com/p/CrD4XO9ukIW/",
  "command": "C:\\Users\\%username%\\AppData\\Local\\Programs\\youtube-dl-gui\\resources\\app.asar.unpacked\\binaries\\yt-dlp.exe -J --flat-playlist --no-cache-dir --ignore-config --user-agent Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.82 Safari/537.36 --proxy https://8.219.176.202:8080 --no-check-certificate --yes-playlist https://www.instagram.com/p/CrD4XO9ukIW/",
  "exitCode": 1,
  "stdout": "null",
  "stderr": "WARNING: [Instagram] CrD4XO9ukIW: General metadata extraction failed (some metadata might be missing).\nWARNING: [Instagram] unable to extract shared data; please report this issue on  https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using  yt-dlp -U\nWARNING: [Instagram] Main webpage is locked behind the login page. Retrying with embed webpage (some metadata might be missing).\nWARNING: [Instagram] unable to extract additional data; please report this issue on  https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using  yt-dlp -U\nERROR: [Instagram] CrD4XO9ukIW: Requested content is not available, rate-limit reached or login required. Use --cookies, --cookies-from-browser, --username and --password, or --netrc (instagram) to provide account credentials",
  "failed": true,
  "timedOut": false,
  "isCanceled": false,
  "killed": false
}

@StefanLobbenmeier
Copy link
Contributor

StefanLobbenmeier commented Apr 16, 2023

At least the new error shows that instagram is blocking the Download:

[Instagram] CrD4XO9ukIW: Requested content is not available, rate-limit reached or login required. Use --cookies, --cookies-from-browser, --username and --password, or --netrc (instagram) to provide account credentials",

if you can login from the browser, the open video downloader allows you to put in cookies (it’s the key button I think). But it could also be that instagram is blocking the download because many people are using that proxy server to access instagram

@artquest
Copy link
Author

I added the cookie txt (using Get cookies.txt LOCALLY extension) and the video finally was properly inserted in the queue (I got a name and description) but was unable to download it, but it's probably because this free proxy is too slow.
I think the problem is solved, I just need to find a new working proxy.
Thank you!

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

No branches or pull requests

3 participants
@artquest @StefanLobbenmeier and others