question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't seem to set up cookies

See original GitHub issue

Checklist

  • I’m reporting a broken site support
  • I’ve verified that I’m running youtube-dl version 2021.06.06
  • I’ve checked that all provided URLs are alive and playable in a browser
  • I’ve checked that all URLs and arguments with special characters are properly quoted or escaped
  • I’ve searched the bugtracker for similar issues including closed ones

Verbose log

C:\Users\Lenovo>youtube-dl -v --cookies ""\C:\Users\Lenovo\Downloads\youtube.com_cookies.txt"" -u ********** -p ******* https://m.youtube.com/watch?v=xH9FtFmYxOM
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', '--cookies', '\\C:\\Users\\Lenovo\\Downloads\\youtube.com_cookies.txt', '-u', 'PRIVATE', '-p', 'PRIVATE', 'https://m.youtube.com/watch?v=xH9FtFmYxOM']
[debug] Encodings: locale cp1252, fs mbcs, out cp850, pref cp1252
[debug] youtube-dl version 2021.06.06
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.19041
[debug] exe versions: ffmpeg 2021-08-14-git-acd079843b-full_build-www.gyan.dev, ffprobe 2021-08-14-git-acd079843b-full_build-www.gyan.dev
[debug] Proxy map: {}
[youtube] Downloading login page
[youtube] Looking up account info
WARNING: Unable to look up account info: HTTP Error 400: Bad Request
[youtube] xH9FtFmYxOM: Downloading webpage
[youtube] xH9FtFmYxOM: Refetching age-gated info webpage
WARNING: unable to download video info webpage: HTTP Error 410: Gone
ERROR: Sign in to confirm your age
This video may be inappropriate for some users.
Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpkqxnwl31\build\youtube_dl\YoutubeDL.py", line 815, in wrapper
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpkqxnwl31\build\youtube_dl\YoutubeDL.py", line 836, in __extract_info
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpkqxnwl31\build\youtube_dl\extractor\common.py", line 534, in extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpkqxnwl31\build\youtube_dl\extractor\youtube.py", line 1713, in _real_extract
youtube_dl.utils.ExtractorError: Sign in to confirm your age
This video may be inappropriate for some users.

Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpkqxnwl31\build\youtube_dl\YoutubeDL.py", line 815, in wrapper
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpkqxnwl31\build\youtube_dl\YoutubeDL.py", line 836, in __extract_info
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpkqxnwl31\build\youtube_dl\extractor\common.py", line 534, in extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpkqxnwl31\build\youtube_dl\extractor\youtube.py", line 1713, in _real_extract
youtube_dl.utils.ExtractorError: Sign in to confirm your age
This video may be inappropriate for some users.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpkqxnwl31\build\youtube_dl\__init__.py", line 465, in _real_main
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpkqxnwl31\build\youtube_dl\YoutubeDL.py", line 2069, in download
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpkqxnwl31\build\youtube_dl\YoutubeDL.py", line 808, in extract_info
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpkqxnwl31\build\youtube_dl\YoutubeDL.py", line 824, in wrapper
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpkqxnwl31\build\youtube_dl\YoutubeDL.py", line 628, in report_error
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpkqxnwl31\build\youtube_dl\YoutubeDL.py", line 598, in trouble
youtube_dl.utils.DownloadError: ERROR: Sign in to confirm your age
This video may be inappropriate for some users.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "__main__.py", line 19, in <module>
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpkqxnwl31\build\youtube_dl\__init__.py", line 475, in main
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpkqxnwl31\build\youtube_dl\__init__.py", line 468, in _real_main
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpkqxnwl31\build\youtube_dl\YoutubeDL.py", line 569, in __exit__
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpkqxnwl31\build\youtube_dl\utils.py", line 2775, in save
OSError: [Errno 22] Invalid argument: '\\C:\\Users\\Lenovo\\Downloads\\youtube.com_cookies.txt'

Description

I followed different guides and setup the cookie.txt file but I can’t seem to be able to login in order to download the link.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
rusemodecommented, Aug 22, 2021

This is likely a server side issue.

I’m not familiar with this, but the problem was fixed by choosing a different format as dirkf last adviced.

0reactions
coletdjnzcommented, Aug 22, 2021
  1. See the last error. You need to fix the path to your cookies file. I think it should be C:\Users\Lenovo\Downloads\youtube.com_cookies.txt
  2. Remove -u and -p, it doesn’t work for YouTube.

Official guide for cookies is here for reference: https://github.com/ytdl-org/youtube-dl#how-do-i-pass-cookies-to-youtube-dl

Ok, that worked, but now I have a different problem?

C:\Users\Lenovo>youtube-dl --cookies ““C:\Users\Lenovo\Downloads\youtube.com_cookies.txt”” https://m.youtube.com/watch?v=xH9FtFmYxOM [youtube] xH9FtFmYxOM: Downloading webpage [youtube] xH9FtFmYxOM: Downloading MPD manifest WARNING: Requested formats are incompatible for merge and will be merged into mkv. [dashsegments] Total fragments: 1044 [download] Destination: Io monaca per 3 carogne e 7 peccatrici (1972) FILM COMPLETO-xH9FtFmYxOM.f244.webm [download] Got server HTTP error: HTTP Error 404: Not Found. Retrying fragment 1 (attempt 1 of 10)… [download] Got server HTTP error: HTTP Error 404: Not Found. Retrying fragment 1 (attempt 2 of 10)… [download] Got server HTTP error: HTTP Error 404: Not Found. Retrying fragment 1 (attempt 3 of 10)… [download] Got server HTTP error: HTTP Error 404: Not Found. Retrying fragment 1 (attempt 4 of 10)… [download] Got server HTTP error: HTTP Error 404: Not Found. Retrying fragment 1 (attempt 5 of 10)… [download] Got server HTTP error: HTTP Error 404: Not Found. Retrying fragment 1 (attempt 6 of 10)… [download] Got server HTTP error: HTTP Error 404: Not Found. Retrying fragment 1 (attempt 7 of 10)… [download] Got server HTTP error: HTTP Error 404: Not Found. Retrying fragment 1 (attempt 8 of 10)… [download] Got server HTTP error: HTTP Error 404: Not Found. Retrying fragment 1 (attempt 9 of 10)… [download] Got server HTTP error: HTTP Error 404: Not Found. Retrying fragment 1 (attempt 10 of 10)… ERROR: giving up after 10 fragment retries

This is a different issue that is not related to cookies. Related: https://github.com/ytdl-org/youtube-dl/issues/29404 https://github.com/ytdl-org/youtube-dl/issues/29395 https://github.com/yt-dlp/yt-dlp/issues/502

This is likely a server side issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Turn cookies on or off - Computer - Google Account Help
On your computer, open Chrome. · At the top right, click More More and then Settings. · Under "Privacy and security," click Site...
Read more >
How to enable cookies on your mobile device - OverDrive | Help
Go to More menu > Settings > Site settings > Cookies. You'll find the More menu icon in the top-right corner. Make sure...
Read more >
Enabling Cookies in Your Browser
Enabling Cookies in Your Browser ; Internet Explorer. Click 'Tools' (the gear icon) in the browser toolbar. Choose Internet Options. ; Safari. Click...
Read more >
Enable cookies in your web browser
Enable cookies in your web browser ; Click the Customize and control Google Chrome menu button in the upper right-hand corner of the...
Read more >
How to Enable Cookies | Digital Trends
Step 1: Launch Chrome and click the button with three dots lined vertically in the top right corner. Alternatively, you can type chrome:// ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found