Totonyus/ydl_api_ng

Problem with instagram public reels

Closed this issue · 2 comments

I can't download public reels from Instagram. It works perfectly in the local system(on my Mac and ubuntu). but in server, it does not work anymore.

[Instagram] Extracting URL: https://www.instagram.com/reel/Cn6NdbZh2r_
[Instagram] Cn6NdbZh2r_: Setting up session
WARNING: [Instagram] Cn6NdbZh2r_: No csrf token set by Instagram API
[Instagram] Cn6NdbZh2r_: Downloading JSON metadata
WARNING: [Instagram] Cn6NdbZh2r_: General metadata extraction failed (some metadata might be missing).
[Instagram] Cn6NdbZh2r_: Downloading webpage
WARNING: [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
WARNING: [Instagram] Main webpage is locked behind the login page. Retrying with embed webpage (some metadata might be missing).
[Instagram] Cn6NdbZh2r_: Downloading embed webpage
WARNING: [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
ERROR: [Instagram] Cn6NdbZh2r_: 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
File "/usr/local/lib/python3.9/site-packages/yt_dlp/extractor/common.py", line 694, in extract
ie_result = self._real_extract(url)
File "/usr/local/lib/python3.9/site-packages/yt_dlp/extractor/instagram.py", line 456, in _real_extract
self.raise_login_required('Requested content is not available, rate-limit reached or login required')
File "/usr/local/lib/python3.9/site-packages/yt_dlp/extractor/common.py", line 1154, in raise_login_required
raise ExtractorError(msg, expected=True)

this is the issue. any workaround for this? if I use this cookie from my browser, it could be a problem with my account.

Hi.

The problem ydl_api_ng doesn't support cookies (yet). It's a lot of work.

However you can try (as suggested by the error message) to use the username/password authentication like in this sample file : https://github.com/Totonyus/ydl_api_ng/blob/main/params/params.sample.ini#L190-L201

Hi.

There is now a way to use cookies with ydl_api_ng. See documentation here : https://github.com/Totonyus/ydl_api_ng#post-request