tying to login to Youtube so I can download my "Watch later playlist" #20027

Closed
opened 2026-02-21 09:34:29 -05:00 by deekerman · 2 comments
Owner

Originally created by @stephane-archer on GitHub (Apr 15, 2020).

Checklist

  • I'm reporting a broken site support
  • I've verified that I'm running youtube-dl version 2020.03.24
  • 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

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'--username', u'PRIVATE', u'https://www.youtube.com/playlist?list=WL']
Type account password and press [Return]:
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2020.03.24
[debug] Python version 2.7.16 (CPython) - Darwin-19.3.0-x86_64-i386-64bit
[debug] exe versions: ffmpeg 4.2.2, ffprobe 4.2.2, rtmpdump 2.4
[debug] Proxy map: {}
[youtube:watchlater] Downloading login page
[youtube:watchlater] Looking up account info
[youtube:watchlater] Logging in
WARNING: Unable to log in: HTTP Error 400: Bad Request
[youtube:watchlater] WL: Downloading webpage
ERROR: This playlist does not exist.
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 797, in extract_info
    ie_result = ie.extract(url)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 530, in extract
    ie_result = self._real_extract(url)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/youtube.py", line 3185, in _real_extract
    _, playlist = self._extract_playlist('WL')
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/youtube.py", line 2685, in _extract_playlist
    raise ExtractorError(message, expected=True)
ExtractorError: This playlist does not exist.

Description

When I run the following command:
youtube-dl -v --username "<myid>" "https://www.youtube.com/playlist?list=WL"
the login fail with the following message
WARNING: Unable to log in: HTTP Error 400: Bad Request

Originally created by @stephane-archer on GitHub (Apr 15, 2020). <!-- ###################################################################### WARNING! IGNORING THE FOLLOWING TEMPLATE WILL RESULT IN ISSUE CLOSED AS INCOMPLETE ###################################################################### --> ## Checklist <!-- Carefully read and work through this check list in order to prevent the most common mistakes and misuse of youtube-dl: - First of, make sure you are using the latest version of youtube-dl. Run `youtube-dl --version` and ensure your version is 2020.03.24. If it's not, see https://yt-dl.org/update on how to update. Issues with outdated version will be REJECTED. - Make sure that all provided video/audio/playlist URLs (if any) are alive and playable in a browser. - Make sure that all URLs and arguments with special characters are properly quoted or escaped as explained in http://yt-dl.org/escape. - Search the bugtracker for similar issues: http://yt-dl.org/search-issues. DO NOT post duplicates. - Finally, put x into all relevant boxes (like this [x]) --> - [x] I'm reporting a broken site support - [x] I've verified that I'm running youtube-dl version **2020.03.24** - [x] I've checked that all provided URLs are alive and playable in a browser - [x] I've checked that all URLs and arguments with special characters are properly quoted or escaped - [x] I've searched the bugtracker for similar issues including closed ones ## Verbose log <!-- Provide the complete verbose output of youtube-dl that clearly demonstrates the problem. Add the `-v` flag to your command line you run youtube-dl with (`youtube-dl -v <your command line>`), copy the WHOLE output and insert it below. It should look similar to this: [debug] System config: [] [debug] User config: [] [debug] Command-line args: [u'-v', u'http://www.youtube.com/watch?v=BaW_jenozKcj'] [debug] Encodings: locale cp1251, fs mbcs, out cp866, pref cp1251 [debug] youtube-dl version 2020.03.24 [debug] Python version 2.7.11 - Windows-2003Server-5.2.3790-SP2 [debug] exe versions: ffmpeg N-75573-g1d0487f, ffprobe N-75573-g1d0487f, rtmpdump 2.4 [debug] Proxy map: {} <more lines> --> ``` [debug] System config: [] [debug] User config: [] [debug] Custom config: [] [debug] Command-line args: [u'-v', u'--username', u'PRIVATE', u'https://www.youtube.com/playlist?list=WL'] Type account password and press [Return]: [debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8 [debug] youtube-dl version 2020.03.24 [debug] Python version 2.7.16 (CPython) - Darwin-19.3.0-x86_64-i386-64bit [debug] exe versions: ffmpeg 4.2.2, ffprobe 4.2.2, rtmpdump 2.4 [debug] Proxy map: {} [youtube:watchlater] Downloading login page [youtube:watchlater] Looking up account info [youtube:watchlater] Logging in WARNING: Unable to log in: HTTP Error 400: Bad Request [youtube:watchlater] WL: Downloading webpage ERROR: This playlist does not exist. Traceback (most recent call last): File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 797, in extract_info ie_result = ie.extract(url) File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 530, in extract ie_result = self._real_extract(url) File "/usr/local/bin/youtube-dl/youtube_dl/extractor/youtube.py", line 3185, in _real_extract _, playlist = self._extract_playlist('WL') File "/usr/local/bin/youtube-dl/youtube_dl/extractor/youtube.py", line 2685, in _extract_playlist raise ExtractorError(message, expected=True) ExtractorError: This playlist does not exist. ``` ## Description <!-- Provide an explanation of your issue in an arbitrary form. Provide any additional information, suggested solution and as much context and examples as possible. If work on your issue requires account credentials please provide them or explain how one can obtain them. --> When I run the following command: ```youtube-dl -v --username "<myid>" "https://www.youtube.com/playlist?list=WL"``` the login fail with the following message ```WARNING: Unable to log in: HTTP Error 400: Bad Request```
deekerman 2026-02-21 09:34:29 -05:00
  • closed this issue
  • added the
    duplicate
    label
Author
Owner

@stephane-archer commented on GitHub (Apr 15, 2020):

I didn't see any new ticket about this issue @dstftw

@stephane-archer commented on GitHub (Apr 15, 2020): I didn't see any new ticket about this issue @dstftw
Author
Owner

@hrxn commented on GitHub (Apr 15, 2020):

Yeah, this is becoming a bit of a mess.

AFAIK, this is still not working properly, i.e. you can't login to your Google/YT account with youtube-dl at the moment.
@dstftw correct me if I am wrong here.

Edit:
Reason: A safety mechanism on Google's side, they try to detect anything that is not a proper user agent, i.e. a modern browser.

This has been going for a while now. (Although, there is an option in the Google account settings: "Allow access to less-secure apps", maybe this works if you allow it temporarily).

If you want to access certain playlists on YouTube (or restricted videos, age-gated etc. pp.) you need to sign into YT in a browser, then simply use one of the good extensions to export your cookies, and finally use the resulting cookies.txt file with the --cookies switch from youtube-dl.

@hrxn commented on GitHub (Apr 15, 2020): Yeah, this is becoming a bit of a mess. AFAIK, this is still not working properly, i.e. you can't login to your Google/YT account with youtube-dl at the moment. @dstftw correct me if I am wrong here. *Edit:* Reason: A safety mechanism on Google's side, they try to detect anything that is not a proper user agent, i.e. a modern browser. This has been going for a while now. (Although, there is an option in the Google account settings: "Allow access to less-secure apps", maybe this works if you allow it temporarily). If you want to access certain playlists on YouTube (or restricted videos, age-gated etc. pp.) you need to sign into YT in a browser, then simply use one of the good extensions to export your cookies, and finally use the resulting cookies.txt file with the `--cookies` switch from youtube-dl.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/youtube-dl#20027
No description provided.