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

Youtube: Unable to look up account info: HTTP Error 400: Bad Request #26400

Open
zant0 opened this issue Aug 21, 2020 · 6 comments
Open

Youtube: Unable to look up account info: HTTP Error 400: Bad Request #26400

zant0 opened this issue Aug 21, 2020 · 6 comments

Comments

@zant0
Copy link

@zant0 zant0 commented Aug 21, 2020

Checklist

  • I'm reporting a broken site support
  • I've verified that I'm running youtube-dl version 2020.07.28
  • 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 https://www.youtube.com/watch?v=E4qXvqnRMhI
[youtube] Downloading login page
[youtube] Looking up account info
WARNING: Unable to look up account info: HTTP Error 400: Bad Request
[youtube] E4qXvqnRMhI: Downloading webpage
ERROR: E4qXvqnRMhI: YouTube said: Unable to extract video data

Description

I tried to download an age restricted video from Youtube which means I need to log in. But the login failed.
The config.txt looks like this (not my actual login of course...):
-o D:\
-u, --username email@gmail.com
-p, --password pa^ssw0#rD

@jadc
Copy link

@jadc jadc commented Aug 22, 2020

I'm having the same issue, but using cookies on a private video. Seems like any video requiring some sort of authorization is not being able to be downloaded.

@nicolaasjan
Copy link

@nicolaasjan nicolaasjan commented Aug 22, 2020

I think this the same issue as:
#26152

Applying a fix in the source code deals with this.
Pull request:
#26100
Commit:
cae18ef

I applied this fix and then downloading works:

youtube-dl --ignore-config -v https://www.youtube.com/watch?v=E4qXvqnRMhI
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--ignore-config', '-v', 'https://www.youtube.com/watch?v=E4qXvqnRMhI']
[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.6.9 (CPython) - Linux-4.15.0-112-generic-x86_64-with-LinuxMint-19.3-tricia
[debug] exe versions: ffmpeg N-98759-g1c7e55d, ffprobe N-98759-g1c7e55d
[debug] Proxy map: {}
[youtube] E4qXvqnRMhI: Downloading webpage
[youtube] E4qXvqnRMhI: Downloading embed webpage
[youtube] E4qXvqnRMhI: Refetching age-gated info webpage
[youtube] E4qXvqnRMhI: Downloading MPD manifest
[debug] Default format spec: bestvideo+bestaudio/best
WARNING: Requested formats are incompatible for merge and will be merged into mkv.
[debug] Invoking downloader on 'https://manifest.googlevideo.com/api/manifest/dash/expire/1598102735/ei/b8hAX4CzLYWkgQeG07ZI/ip/217.121.193.63/id/138a97bea9d13212/source/youtube/requiressl/yes/playback_host/r2---sn-5hne6nlr.googlevideo.com/mh/er/mm/31%2C26/mn/sn-5hne6nlr%2Csn-4g5e6nsr/ms/au%2Conr/mv/m/mvi/2/pl/15/hfr/all/as/fmp4_audio_clear%2Cwebm_audio_clear%2Cwebm2_audio_clear%2Cfmp4_sd_hd_clear%2Cwebm2_sd_hd_clear/initcwndbps/2092500/vprv/1/mt/1598081072/fvip/2/keepalive/yes/itag/0/sparams/expire%2Cei%2Cip%2Cid%2Csource%2Crequiressl%2Chfr%2Cas%2Cvprv%2Citag/sig/AOq0QJ8wRAIgYyGNQcN0WWXevNmzGhdEKke0_LGQwWUPUcwWBnpsAcoCIEssoq1lqSkiJSNpODuU0meVQf3AXP0DMZkhmQkWNiX7/lsparams/playback_host%2Cmh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps/lsig/AG3C_xAwRQIhANrpNDyl4CBcWe89vv7-BTa8dLdij4UD6yvZSJnqoqzpAiBt5RPMdbKuUoXAe9sE88m7lDuUKWELVlYRNJL9LRih8g%3D%3D'
[dashsegments] Total fragments: 79
[download] Destination: 그녀의탐구생활 _ 가슴사이즈는 노브라 상태에서 재야한다 G컵인줄알았는데 아니였어! _ feat.온여이벤트-E4qXvqnRMhI.f137.mp4
[download] 100% of 115.07MiB in 00:41
[debug] Invoking downloader on 'https://manifest.googlevideo.com/api/manifest/dash/expire/1598102735/ei/b8hAX4CzLYWkgQeG07ZI/ip/217.121.193.63/id/138a97bea9d13212/source/youtube/requiressl/yes/playback_host/r2---sn-5hne6nlr.googlevideo.com/mh/er/mm/31%2C26/mn/sn-5hne6nlr%2Csn-4g5e6nsr/ms/au%2Conr/mv/m/mvi/2/pl/15/hfr/all/as/fmp4_audio_clear%2Cwebm_audio_clear%2Cwebm2_audio_clear%2Cfmp4_sd_hd_clear%2Cwebm2_sd_hd_clear/initcwndbps/2092500/vprv/1/mt/1598081072/fvip/2/keepalive/yes/itag/0/sparams/expire%2Cei%2Cip%2Cid%2Csource%2Crequiressl%2Chfr%2Cas%2Cvprv%2Citag/sig/AOq0QJ8wRAIgYyGNQcN0WWXevNmzGhdEKke0_LGQwWUPUcwWBnpsAcoCIEssoq1lqSkiJSNpODuU0meVQf3AXP0DMZkhmQkWNiX7/lsparams/playback_host%2Cmh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps/lsig/AG3C_xAwRQIhANrpNDyl4CBcWe89vv7-BTa8dLdij4UD6yvZSJnqoqzpAiBt5RPMdbKuUoXAe9sE88m7lDuUKWELVlYRNJL9LRih8g%3D%3D'
[dashsegments] Total fragments: 43
[download] Destination: 그녀의탐구생활 _ 가슴사이즈는 노브라 상태에서 재야한다 G컵인줄알았는데 아니였어! _ feat.온여이벤트-E4qXvqnRMhI.f251.webm
[download] 100% of 6.81MiB in 00:05
[ffmpeg] Merging formats into "그녀의탐구생활 _ 가슴사이즈는 노브라 상태에서 재야한다 G컵인줄알았는데 아니였어! _ feat.온여이벤트-E4qXvqnRMhI.mkv"
[debug] ffmpeg command line: ffmpeg -y -loglevel repeat+info -i 'file:그녀의탐구생활 _ 가슴사이즈는 노브라 상태에서 재야한다 G컵인줄알았는데 아니였어! _ feat.온여이벤트-E4qXvqnRMhI.f137.mp4' -i 'file:그녀의탐구생활 _ 가슴사이즈는 노브라 상태에서 재야한다 G컵인줄알았는데 아니였어! _ feat.온여이벤트-E4qXvqnRMhI.f251.webm' -c copy -map 0:v:0 -map 1:a:0 'file:그녀의탐구생활 _ 가슴사이즈는 노브라 상태에서 재야한다 G컵인줄알았는데 아니였어! _ feat.온여이벤트-E4qXvqnRMhI.temp.mkv'
Deleting original file 그녀의탐구생활 _ 가슴사이즈는 노브라 상태에서 재야한다 G컵인줄알았는데 아니였어! _ feat.온여이벤트-E4qXvqnRMhI.f137.mp4 (pass -k to keep)
Deleting original file 그녀의탐구생활 _ 가슴사이즈는 노브라 상태에서 재야한다 G컵인줄알았는데 아니였어! _ feat.온여이벤트-E4qXvqnRMhI.f251.webm (pass -k to keep)

If you don't know how to compile, I guess you will have to wait for a new version of youtube-dl...

@jadc
Copy link

@jadc jadc commented Aug 22, 2020

I tried that patch and it made no difference.

@nicolaasjan
Copy link

@nicolaasjan nicolaasjan commented Aug 22, 2020

I tried that patch and it made no difference.

Can you show the full verbose log?

@upex
Copy link

@upex upex commented Aug 29, 2020

My cmd works for most of the URLs but throwing below errors for at least two of the URLs:
https://www.youtube.com/watch?v=3HI5CQ4Oc1I
https://www.youtube.com/watch?v=-Pwf7Q6j3tI

'[debug] User config: []\n' +
'[debug] Custom config: []\n' +
"[debug] Command-line args: ['-i', '--username', 'PRIVATE', '--password', 'PRIVATE', '--user-agent', 'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)', '--verbose', '-f', 'bestvideo[ext=webm && height>=1080]/bestvideo[ext=mp4 && height>=1080]/best[ext=webm]/best[ext=mp4]/best', '--get-url', '--skip-download', '--cookies', '/etc/newcookiefile.txt', 'https://www.youtube.com/embed/-Pwf7Q6j3tI?autoplay=0&enablejsapi=1']\n" +
'[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8\n' +
'[debug] youtube-dl version 2020.07.28\n' +
'[debug] Python version 3.6.9 (CPython) - Linux-5.3.0-1023-aws-x86_64-with-Ubuntu-18.04-bionic\n' +
'[debug] exe versions: none\n' +
'[debug] Proxy map: {}\n' +
'WARNING: Unable to look up account info: HTTP Error 400: Bad Request\n' +
'ERROR: -Pwf7Q6j3tI: YouTube said: Unable to extract video data\n' +
'Traceback (most recent call last):\n' +
'  File "/home/ubuntu/xxxx-backend/node_modules/youtube-dl/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 797, in extract_info\n' +
 '    ie_result = ie.extract(url)\n' +
'  File "/home/ubuntu/xxxx-backend/node_modules/youtube-dl/bin/youtube-dl/youtube_dl/extractor/common.py", line 530, in extract\n' +
'    ie_result = self._real_extract(url)\n' +
 '  File "/home/ubuntu/xxxx-backend/node_modules/youtube-dl/bin/youtube-dl/youtube_dl/extractor/youtube.py", line 1893, in _real_extract\n' +
"    'YouTube said: %s' % unavailable_message, expected=True, video_id=video_id)\n" +
'youtube_dl.utils.ExtractorError: -Pwf7Q6j3tI: YouTube said: Unable to extract video data\n'

Please help if anybody got a fix for this!!

@nicolaasjan
Copy link

@nicolaasjan nicolaasjan commented Aug 30, 2020

My cmd works for most of the URLs but throwing below errors for at least two of the URLs:

The World’s Worst Liar (“The Usual Suspects” Parody) - Key & Peele
Overly Competitive Trumpeters - Key & Peele

Please help if anybody got a fix for this!!

Works here...
(but without --cookies and/or --username, --password, etc).

Note that youtube-dl by default downloads the best video/audio quality.

However, you don't have ffmpeg installed, so the separate video and audio streams can't be merged into one file:
[debug] exe versions: none

youtube-dl -v --ignore-config https://www.youtube.com/watch?v=3HI5CQ4Oc1I
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', '--ignore-config', 'https://www.youtube.com/watch?v=3HI5CQ4Oc1I']
[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.6.9 (CPython) - Linux-4.15.0-112-generic-x86_64-with-LinuxMint-19.3-tricia
[debug] exe versions: ffmpeg N-98759-g1c7e55d, ffprobe N-98759-g1c7e55d
[debug] Proxy map: {}
[youtube] 3HI5CQ4Oc1I: Downloading webpage
[debug] Default format spec: bestvideo+bestaudio/best
WARNING: Requested formats are incompatible for merge and will be merged into mkv.
[debug] Invoking downloader on 'https://r4---sn-5hne6nsr.googlevideo.com/videoplayback?expire=1598797840&ei=sGNLX9SjHZj7gQfsk6ywBA&ip=*.*.*.*&id=o-ABoMTV403R3v87YARlYDkdwXOvCmI26eartwYxhPAITB&itag=137&aitags=133%2C134%2C135%2C136%2C137%2C160%2C242%2C243%2C244%2C247%2C248%2C278%2C394%2C395%2C396%2C397%2C398%2C399&source=youtube&requiressl=yes&mh=Lc&mm=31%2C26&mn=sn-5hne6nsr%2Csn-4g5e6nzs&ms=au%2Conr&mv=m&mvi=4&pl=15&gcr=nl&initcwndbps=1392500&vprv=1&mime=video%2Fmp4&gir=yes&clen=23180293&dur=228.186&lmt=1574931952354816&mt=1598776113&fvip=4&keepalive=yes&c=WEB&txp=6535432&sparams=expire%2Cei%2Cip%2Cid%2Caitags%2Csource%2Crequiressl%2Cgcr%2Cvprv%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRQIhAIXzM_RrpS-4-wuNrf2-te9OX85cPPkL3_-8qpnmQCLoAiAGnpq5UWii4Cl9OHyXzi3LXw9_kvYo2-DaW3l2XoJMag%3D%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRAIgA3l7PRRSr3ifCCU-Zot7mY38olAuLVdEBeD91V0l2F0CIDUjMTpfQ0FsxMC4Oqkfr8dDt1v5n5x6eGmb0ZHnJ3ho&ratebypass=yes'
[download] Destination: The World’s Worst Liar (“The Usual Suspects” Parody) - Key & Peele-3HI5CQ4Oc1I.f137.mp4
[download] 100% of 22.11MiB in 00:03
[debug] Invoking downloader on 'https://r4---sn-5hne6nsr.googlevideo.com/videoplayback?expire=1598797840&ei=sGNLX9SjHZj7gQfsk6ywBA&ip=*.*.*.*&id=o-ABoMTV403R3v87YARlYDkdwXOvCmI26eartwYxhPAITB&itag=251&source=youtube&requiressl=yes&mh=Lc&mm=31%2C26&mn=sn-5hne6nsr%2Csn-4g5e6nzs&ms=au%2Conr&mv=m&mvi=4&pl=15&gcr=nl&initcwndbps=1392500&vprv=1&mime=audio%2Fwebm&gir=yes&clen=3456022&dur=228.221&lmt=1592983726996210&mt=1598776113&fvip=4&keepalive=yes&c=WEB&txp=6511222&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cgcr%2Cvprv%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRQIhAJ0ow8mz_vy2bi9nS2t6MOLpJ1Rp85pXsrm8GOAApUaIAiA6mhW_R7BFRzJH9B0u4ESOYT231hvgAJ0_iTg6iQ7Sqg%3D%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRAIgA3l7PRRSr3ifCCU-Zot7mY38olAuLVdEBeD91V0l2F0CIDUjMTpfQ0FsxMC4Oqkfr8dDt1v5n5x6eGmb0ZHnJ3ho&ratebypass=yes'
[download] Destination: The World’s Worst Liar (“The Usual Suspects” Parody) - Key & Peele-3HI5CQ4Oc1I.f251.webm
[download] 100% of 3.30MiB in 00:00
[ffmpeg] Merging formats into "The World’s Worst Liar (“The Usual Suspects” Parody) - Key & Peele-3HI5CQ4Oc1I.mkv"
[debug] ffmpeg command line: ffmpeg -y -loglevel repeat+info -i 'file:The World’s Worst Liar (“The Usual Suspects” Parody) - Key & Peele-3HI5CQ4Oc1I.f137.mp4' -i 'file:The World’s Worst Liar (“The Usual Suspects” Parody) - Key & Peele-3HI5CQ4Oc1I.f251.webm' -c copy -map 0:v:0 -map 1:a:0 'file:The World’s Worst Liar (“The Usual Suspects” Parody) - Key & Peele-3HI5CQ4Oc1I.temp.mkv'
Deleting original file The World’s Worst Liar (“The Usual Suspects” Parody) - Key & Peele-3HI5CQ4Oc1I.f137.mp4 (pass -k to keep)
Deleting original file The World’s Worst Liar (“The Usual Suspects” Parody) - Key & Peele-3HI5CQ4Oc1I.f251.webm (pass -k to keep)
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
4 participants
You can’t perform that action at this time.