Totonyus / ydl_api_ng

GNU General Public License v3.0
134 stars 15 forks source link

Problem with instagram public reels #10

Closed nowfalsalahudeen closed 8 months ago

nowfalsalahudeen commented 1 year ago

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.

Totonyus commented 1 year ago

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

Totonyus commented 10 months ago

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