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

can't login to youtube WARNING: Unable to look up account info: HTTP Error 400: Bad Request #26196

Open
celloh123 opened this issue Jul 30, 2020 · 15 comments

Comments

@celloh123
Copy link

@celloh123 celloh123 commented Jul 30, 2020

Checklist

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

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--cookies', 'cookies.txt', '--user-agent=Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)', '-f', '141', '-u', 'PRIVATE', '-p', 'PRIVATE', '-v', 'https://music.youtube.com/watch?v=Leq8J0E2TQ0']
[debug] Encodings: locale cp1254, fs mbcs, out cp857, pref cp1254
[debug] youtube-dl version 2020.07.28
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.19041
[debug] exe versions: ffmpeg git-2020-07-16-d11cc74, ffprobe git-2020-07-16-d11cc74
[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] Leq8J0E2TQ0: Downloading webpage
[youtube] {18} signature length 105, html5 player c718385a
[youtube] {137} signature length 105, html5 player c718385a
[youtube] {248} signature length 105, html5 player c718385a
[youtube] {136} signature length 105, html5 player c718385a
[youtube] {247} signature length 101, html5 player c718385a
[youtube] {135} signature length 105, html5 player c718385a
[youtube] {244} signature length 105, html5 player c718385a
[youtube] {134} signature length 101, html5 player c718385a
[youtube] {243} signature length 105, html5 player c718385a
[youtube] {133} signature length 105, html5 player c718385a
[youtube] {242} signature length 105, html5 player c718385a
[youtube] {160} signature length 101, html5 player c718385a
[youtube] {278} signature length 105, html5 player c718385a
[youtube] {140} signature length 105, html5 player c718385a
[youtube] {249} signature length 105, html5 player c718385a
[youtube] {250} signature length 105, html5 player c718385a
[youtube] {251} signature length 101, html5 player c718385a
ERROR: requested format not available
Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpq2whuxta\build\youtube_dl\YoutubeDL.py", line 808, in extract_info
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpq2whuxta\build\youtube_dl\YoutubeDL.py", line 863, in process_ie_result
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpq2whuxta\build\youtube_dl\YoutubeDL.py", line 1636, in process_video_result
youtube_dl.utils.ExtractorError: requested format not available

Description

So, here is the thing. I have an Youtube Music Premium subscription which lets me download music with audio format 141. To do that obviously, I need to login to youtube. So I tried my darn hardest to do so, I've tried cookies, I've tried user agent, I even tried changing my gmail address but none of them worked! I either get error 404 unable to look up account data or error 400 bad request
also if you are going to tag this as duplicate, at least tell me what issue's duplicate this is!

@antwal
Copy link

@antwal antwal commented Aug 1, 2020

same problem

@Shulyaka
Copy link

@Shulyaka Shulyaka commented Aug 2, 2020

I have a similar error, but instead HTTP 400 on "Looking up account info" error I get HTTP 404.
It looks like Google has changed something with authenticating mechanism so authenticating with -u and -p is not working.

I have tried to investigate the issue but with no luck so far. I tried to output the request URL and data it tries to POST then sending the same request with curl (same headers, same URL, same DATA) and it returns HTTP 200 with something that looks like a malformed JSON with additional symbols in front of it. I couldn't understand why the results with CURL is different so far, there must be some difference that I considered insignifocant.

@jjemil749
Copy link

@jjemil749 jjemil749 commented Aug 3, 2020

Me too. I am having similar error trying to log into youtube
I have the .netrc file in ~/.netrc

$youtube-dl --version
2020.07.28

Content of the .netrc file is:
machine youtube login <youtube gmail username> password <gmail password>

I am using the youtube-dl command line:
$ youtube-dl --netrc -o - "https://m.youtube.com/watch?v=xCl5BtloMy4" | mpv -

I am getting the error:

Resuming playback. This behavior can be disabled with --no-resume-playback.
[file] Reading from stdin...
[youtube] Downloading login page
[youtube] Looking up account info
WARNING: Unable to look up account info: HTTP Error 400: Bad Request

@selfisekai
Copy link

@selfisekai selfisekai commented Aug 7, 2020

CR (fake credentials, the same happens on real ones):

 laura@iino  ~  youtube-dl --verbose --username daybyday --password imfedupwithallthis --print-traffic https://www.youtube.com/watch\?v\=T_Rn8TAIL2w\&list\=RDMMT_Rn8TAIL2w\&start_radio\=1
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--verbose', '--username', 'PRIVATE', '--password', 'PRIVATE', '--print-traffic', 'https://www.youtube.com/watch?v=T_Rn8TAIL2w&list=RDMMT_Rn8TAIL2w&start_radio=1']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8
[debug] youtube-dl version 2020.07.28
[debug] Python version 3.8.4 (CPython) - Linux-5.7.13_1-x86_64-with-glibc2.2.5
[debug] exe versions: ffmpeg 4.3.1, ffprobe 4.3.1
[debug] Proxy map: {}
[youtube:playlist] Downloading login page
send: b'GET /ServiceLogin?disable_polymer=true HTTP/1.1\r\nHost: accounts.google.com\r\nUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3632.1 Safari/537.36\r\nAccept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Encoding: gzip, deflate\r\nAccept-Language: en-us,en;q=0.5\r\nConnection: close\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: Content-Type: text/html; charset=utf-8
header: X-Frame-Options: DENY
header: x-auto-login: realm=com.google&args=continue%3Dhttps%253A%252F%252Faccounts.google.com%252FManageAccount%253Fnc%253D1
header: Cache-Control: no-cache, no-store, max-age=0, must-revalidate
header: Pragma: no-cache
header: Expires: Mon, 01 Jan 1990 00:00:00 GMT
header: Date: Fri, 07 Aug 2020 00:25:05 GMT
header: Content-Encoding: gzip
header: Strict-Transport-Security: max-age=31536000; includeSubDomains
header: Content-Security-Policy: script-src 'report-sample' 'nonce-ER88lXDu96PS54/7LXROLQ' 'unsafe-inline' 'unsafe-eval';object-src 'none';base-uri 'self';report-uri /cspreport
header: X-Content-Type-Options: nosniff
header: X-XSS-Protection: 1; mode=block
header: Server: GSE
header: Set-Cookie: GAPS=1:avwYaG2g2zAziX7kKij1XisxeQCDZQ:I_UHO-8jwP1KJaAO;Path=/;Expires=Sun, 07-Aug-2022 00:25:05 GMT;Secure;HttpOnly;Priority=HIGH
header: Set-Cookie: __Host-GAPS=1:avwYaG2g2zAziX7kKij1XisxeQCDZQ:I_UHO-8jwP1KJaAO;Path=/;Expires=Sun, 07-Aug-2022 00:25:05 GMT;Secure;HttpOnly;Priority=HIGH
header: Alt-Svc: h3-29=":443"; ma=2592000,h3-27=":443"; ma=2592000,h3-T050=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"
header: Connection: close
header: Transfer-Encoding: chunked
[youtube:playlist] Looking up account info
send: b'POST /_/signin/sl/lookup?disable_polymer=true HTTP/1.1\r\nContent-Length: 1035\r\nHost: accounts.google.com\r\nCookie: GAPS=1:avwYaG2g2zAziX7kKij1XisxeQCDZQ:I_UHO-8jwP1KJaAO; __Host-GAPS=1:avwYaG2g2zAziX7kKij1XisxeQCDZQ:I_UHO-8jwP1KJaAO\r\nContent-Type: application/x-www-form-urlencoded;charset=utf-8\r\nGoogle-Accounts-Xsrf: 1\r\nUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3632.1 Safari/537.36\r\nAccept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Encoding: gzip, deflate\r\nAccept-Language: en-us,en;q=0.5\r\nConnection: close\r\n\r\n'
send: b'__msgId__=%27%2B_.R%28a.Fr%29%2B%27&pstMsg=1&checkConnection=youtube&checkedDomains=youtube&ct=%27%2B_.R%28c%29%2B%27&%27%2B_.R%28a.name%29%2B%27=%27%2B_.R%28b%29%2B%27&hl=en&deviceinfo=%5Bnull%2Cnull%2Cnull%2C%5B%5D%2Cnull%2C%22US%22%2Cnull%2Cnull%2C%5B%5D%2C%22GlifWebSignIn%22%2Cnull%2C%5Bnull%2Cnull%2C%5B%5D%5D%5D&f.req=%5B%22daybyday%22%2C+null%2C+%5B%5D%2C+null%2C+%22US%22%2C+null%2C+null%2C+2%2C+false%2C+true%2C+%5Bnull%2C+null%2C+%5B2%2C+1%2C+null%2C+1%2C+%22https%3A%2F%2Faccounts.google.com%2FServiceLogin%3Fpassive%3Dtrue%26continue%3Dhttps%253A%252F%252Fwww.youtube.com%252Fsignin%253Fnext%253D%25252F%2526action_handle_signin%253Dtrue%2526hl%253Den%2526app%253Ddesktop%2526feature%253Dsign_in_button%26hl%3Den%26service%3Dyoutube%26uilel%3D3%26requestPath%3D%252FServiceLogin%26Page%3DPasswordSeparationSignIn%22%2C+null%2C+%5B%5D%2C+4%5D%2C+1%2C+%5Bnull%2C+null%2C+%5B%5D%5D%2C+null%2C+null%2C+null%2C+true%5D%2C+%22daybyday%22%5D&flowName=GlifWebSignIn&flowEntry=ServiceLogin&bgRequest=%5B%22identifier%22%2C%22%22%5D'
reply: 'HTTP/1.1 400 Bad Request\r\n'
header: Cache-Control: no-cache, no-store, max-age=0, must-revalidate
header: Pragma: no-cache
header: Expires: Mon, 01 Jan 1990 00:00:00 GMT
header: Date: Fri, 07 Aug 2020 00:25:06 GMT
header: Content-Type: text/html; charset=utf-8
header: Content-Encoding: gzip
header: X-Content-Type-Options: nosniff
header: X-XSS-Protection: 1; mode=block
header: Server: GSE
header: Alt-Svc: h3-29=":443"; ma=2592000,h3-27=":443"; ma=2592000,h3-T050=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"
header: Connection: close
header: Transfer-Encoding: chunked
WARNING: Unable to look up account info: HTTP Error 400: Bad Request
[youtube:playlist] Downloading playlist RDMMT_Rn8TAIL2w - add --no-playlist to just download video T_Rn8TAIL2w
[youtube:playlist] RDMMT_Rn8TAIL2w: Downloading page 1 of Youtube mix
send: b'GET /watch?v=T_Rn8TAIL2w&list=RDMMT_Rn8TAIL2w&disable_polymer=true HTTP/1.1\r\nHost: www.youtube.com\r\nUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3632.1 Safari/537.36\r\nAccept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Encoding: gzip, deflate\r\nAccept-Language: en-us,en;q=0.5\r\nConnection: close\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: X-Content-Type-Options: nosniff
header: Accept-CH: DPR
header: P3P: CP="This is not a P3P policy! See http://support.google.com/accounts/answer/151657?hl=en for more info."
header: X-Frame-Options: SAMEORIGIN
header: Strict-Transport-Security: max-age=31536000
header: Content-Encoding: gzip
header: Content-Type: text/html; charset=utf-8
header: Expires: Tue, 27 Apr 1971 19:44:06 GMT
header: Accept-CH-Lifetime: 2592000
header: Cache-Control: no-cache
header: Date: Fri, 07 Aug 2020 00:25:06 GMT
header: Server: YouTube Frontend Proxy
header: X-XSS-Protection: 0
header: Set-Cookie: VISITOR_INFO1_LIVE=kPZZR5ugzBI; path=/; domain=.youtube.com; secure; expires=Wed, 03-Feb-2021 00:25:06 GMT; httponly; samesite=None
header: Set-Cookie: GPS=1; path=/; domain=.youtube.com; expires=Fri, 07-Aug-2020 00:55:06 GMT
header: Set-Cookie: YSC=W3w416LjTF0; path=/; domain=.youtube.com; secure; httponly; samesite=None
header: Set-Cookie: CONSENT=WP.289b92; expires=Fri, 01-Jan-2038 00:00:00 GMT; path=/; domain=.youtube.com
header: Alt-Svc: h3-29=":443"; ma=2592000,h3-27=":443"; ma=2592000,h3-T050=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"
header: Connection: close
header: Transfer-Encoding: chunked
[download] Downloading playlist: RDMMT_Rn8TAIL2w
[youtube:playlist] playlist RDMMT_Rn8TAIL2w: Collected 0 video ids (downloading 0 of them)
[download] Finished downloading playlist: RDMMT_Rn8TAIL2w
@egormasalitin
Copy link

@egormasalitin egormasalitin commented Aug 11, 2020

Any updates on this one?

@celloh123
Copy link
Author

@celloh123 celloh123 commented Aug 11, 2020

Any updates on this one?

nope. still gives the same error

@Legion495
Copy link

@Legion495 Legion495 commented Aug 13, 2020

I have to add I also ran into this issue. I noticed it that the login is needed for age restricted videos.

@arisboch
Copy link

@arisboch arisboch commented Aug 19, 2020

JDownloader 2 can download these videos, why is this program unable to do so? JDownloader is open-source, why don't have a look over there?

Edit: Why am I getting downvotes for mentioning how others solved the problem or never had it in the first place? An odd kind of online tribalism?

@selfisekai
Copy link

@selfisekai selfisekai commented Aug 20, 2020

does really anyone expect youtube-dl to do anything else than quickfixing youtube extractor when it starts breaking for all videos?

@pubdigital
Copy link

@pubdigital pubdigital commented Aug 30, 2020

Edit: Why am I getting down votes for mentioning how others solved the problem or never had it in the first place? An odd kind of online tribalism?

Because Sir, you are not very polite. Thanks to selfisekai i can test my self the same problem with de HTTP dialog. The problem is clearly the post to /_/signin/sl/lookup is not accepted by the domain https://accounts.google.com/ anymore. For sure google change something in the authorization method. I'm not proficiency enough for resolve the issue. I hope the developer see these message and have time to study the subject.

does really anyone expect youtube-dl to do anything else than quickfixing youtube extractor when it starts breaking for all videos?

At these time is irrelevant to most of youtube-dl users because these problems only arise when you need to login. Mostly videos can be watch in anonymous way. The other possible solution is to use cookies sessions but i hope these bug can be fixed in the future soon.

Thanks.

@arisboch
Copy link

@arisboch arisboch commented Aug 30, 2020

Because Sir, you are not very polite.

What about my comment was impolite?

@celloh123
Copy link
Author

@celloh123 celloh123 commented Aug 30, 2020

Because Sir, you are not very polite.

lmao he was not being impolite at all.

@Shulyaka
Copy link

@Shulyaka Shulyaka commented Aug 30, 2020

Let's not get into this please...

@Toxlen
Copy link

@Toxlen Toxlen commented Sep 23, 2020

Any new of this issue ??

@strenkml
Copy link

@strenkml strenkml commented Sep 30, 2020

I am also having this issue. Running version: 2020.09.20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
You can’t perform that action at this time.