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

login to youtube not working #21313

Closed
4 tasks done
MatrixView opened this issue Jun 6, 2019 · 6 comments
Closed
4 tasks done

login to youtube not working #21313

MatrixView opened this issue Jun 6, 2019 · 6 comments

Comments

@MatrixView
Copy link

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

youtube-dl.exe -i -u ...... -p ....... :ytsubs --max-downloads 5 --skip-download -j --no-check-certificate --verbose
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-i', '-u', 'PRIVATE', '-p', 'PRIVATE', ':ytsubs', '--max-downloads', '5', '--skip-download', '-j', '--no-check-certificate', '--verbose']
[debug] Encodings: locale cp1252, fs mbcs, out cp850, pref cp1252
[debug] youtube-dl version 2019.05.20
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.18362
[debug] exe versions: ffmpeg N-89894-g18e2ac032e, ffprobe N-67388-g37425fc, phantomjs 2.1.1, rtmpdump 2.4-47-gc26c541
[debug] Proxy map: {}
WARNING: Unable to log in: HTTP Error 400: Bad Request

Description

Hi guys,

Since yesterday evening, about 12-15 hrs ago, I get: "Unable to log in HTTP Error 400: Bad Request". I've logged in with the same credentials in a browser and that works just fine.

Hopefully you can fix this... or tell me what I'm doing wrong... [although I've been using the same commandline with those params (minus the verbose) for years successfully]

Thanx!

@dstftw dstftw closed this as completed Jun 6, 2019
@MatrixView
Copy link
Author

Nice that you closed this... but a duplicate to what issue? What I found with this error is that youtube-dl needed to be fixed in the past...

Thanx!

@MatrixView
Copy link
Author

@dstftw Could you please provide a link how to solve this...? The duplicate tag doesn't help as other issues from the past with this error do not provide a solution... :-(

@MatrixView
Copy link
Author

This is for people that run into this issue too:
I've been looking for a workaround for hours, and finally found one!

What I've done is install the cookies plugin in chrome:
https://chrome.google.com/webstore/detail/cookiestxt/njabckikapfpffapmjgojcnbfjonfjfg?hl=en

Then go to https://youtube.com, login and press that cookie plugin button to save a cookies.txt
As an extra I also went to https://accounts.google.com/ and save another cookies2.txt file

I merged those 2 text files into one YT-cookies.txt file and then addes the following parameter to youtube-dl:

--cookies=YT-cookies.txt

of course you can prefix the txt file with the path.

...then login works again. :-) at least, for me...

Shouldn't this be in the FAQ for youtube-dl?

@hub2git
Copy link
Contributor

hub2git commented Jun 16, 2019

@MatrixView, thanks for your last comment. I followed your instructions and am again able to log into my Youtube account. Appreciate it!

@MatrixView
Copy link
Author

@hub2git Thanx for your appreciation, glad to have helped someone with this.

What seems to be even better is that youtube-dl automatically updates the given cookie file, so it doesn't seem to expire. I found out because I had the cookie file open in Notepad++ and it reports changes once I run my script (containing the youtube-dl line with the cookie parameter)

I understand it is frustrating for the admins of this project to support youtube-dl and so many sites, google authentication, etc... while users keep asking the same questions regularly, but sometimes you just don't know how to solve an error and any past reported issue that comes remotely close doesn't have a workaround either or got solved by a fix/update to the program itself.

I really love Youtube-DL, I use it almost as much as PowerShell and Xidel. It's invaluable in any webscraping/downloading toolbox.

@donmiyamar
Copy link

I tried the steps outline by @MatrixView after already attempting the same in Firefox. I still get the 400: Bad Request

[youtube:channel] Downloading login page
[youtube:channel] Looking up account info
[youtube:channel] Logging in
WARNING: Unable to log in: HTTP Error 400: Bad Request
[youtube:channel] replaced-here-for-privacy: Downloading channel page
[youtube:playlist] Downloading login page
[youtube:playlist] Looking up account info
[youtube:playlist] Logging in
WARNING: Unable to log in: HTTP Error 400: Bad Request
[youtube:playlist] replaced-here-for-privacy: Downloading webpage
[download] Downloading playlist: Uploads from Adison Briana
[youtube:playlist] replaced-here-for-privacy: Downloading page #1
[youtube:playlist] replaced-here-for-privacy: Downloading page #2
[youtube:playlist] playlist Uploads from replaced-here-from-someone: Downloading 225 videos
[download] Downloading video 1 of 225
[youtube] Downloading login page
[youtube] Looking up account info
[youtube] Logging in
WARNING: Unable to log in: HTTP Error 400: Bad Request

@ytdl-org ytdl-org deleted a comment from sarffy1986 Feb 27, 2020
@ytdl-org ytdl-org deleted a comment from peteruhrig Feb 27, 2020
@ytdl-org ytdl-org locked and limited conversation to collaborators Feb 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants