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

Unable to log in: HTTP Error 400: Bad Request (YouTube) #23449

Closed
sngbrdb opened this issue Dec 18, 2019 · 1 comment
Closed

Unable to log in: HTTP Error 400: Bad Request (YouTube) #23449

sngbrdb opened this issue Dec 18, 2019 · 1 comment
Labels

Comments

@sngbrdb
Copy link

@sngbrdb sngbrdb commented Dec 18, 2019

Checklist

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

d:\youtube-dl\>youtube-dl.exe --write-pages --config-location d:\youtube-dl\configwtf.txt https://www.youtube.com/feed/subscriptions?disable_polymer=1
[debug] System config: []
[debug] User config: []
[debug] Custom config: ['--user-agent', 'Mozilla/5.0 (Windows NT 6.3; rv:56.0) Gecko/20100101 Firefox/56.0', '--username', 'PRIVATE', '--password', 'PRIVATE', '--referer', 'https://www.youtube.com/', '--cookies', 'd:/youtube-dl/cookies_fx.txt', '--no-call-home', '--no-check-certificate', '--ffmpeg-location', 'D:/youtube-dl', '--verbose', '--ignore-errors', '--write-all-thumbnails', '-o', 'q:/_yt/%(uploader)s -- %(upload_date)s  %(title)s  %(id)s  [%(resolution)s %(duration)ss %(fps)sfps] %(ext)s [%(format_id)s].%(ext)s', '--no-overwrites', '--no-post-overwrites', '--add-metadata', '--print-traffic', '--console-title', '--ski
p-unavailable-fragments', '--max-downloads', '500', '--playlist-end', '6', '--no-cache', '--format', '(315/308)+(251/172/250/171/249)/(299)+(328/325/258/256/141/140/139)/(303)+(251/172/250/171/249)/(298)+(328/325/258/256/141/140/139)/(302)+(251/172/250/171/249),(272)+(251/172/250/171/249)/(38)/(266)+(328/325/258/256/14
1/140/139)/(315/313)+(251/172/250/171/249)/(264)+(328/325/258/256/141/140/139)/(308/271)+(251/172/250/171/249)/(37)/(299/138/137)+(328/325/258/256/141/140/139)/(303/248/170)+(251/172/250/171/249)/(46)/(85)/(298/136)+(328/325/258/256/141/140/139)/(22)/(302/247/169)+(251/172/250/171/249)/(45/102)/(84)/(212/135)+(328/325/
258/256/141/140/139)/(78/59)/(246/245/244/219/218/168)+(251/172/250/171/249)/(44)/(35)/(101)/(83)/(134)+(328/325/258/256/141/140/139)/(18)/(243/167)+(251/172/250/171/249)/(43)/(34)/(100)/(82)/(6)/(133)+(328/325/258/256/141/140/139)/(132)/(242)+(251/172/250/171/249)/(5/36)/(160)+(328/325/258/256/141/140/139)/(278)+(251/
172/250/171/249)/(17)/(151)/(13)/(bestvideo+bestaudio)[format_id!^=9][format_id!^=30],(38)/(266)+(328/325/258/256/141/140/139)/(264)+(328/325/258/256/141/140/139)/(37)/(299/138/137)+(328/325/258/256/141/140/139)/(298/136)+(328/325/258/256/141/140/139)/(22),(38)/(266)+(328/325/258/256/141/140/139)/(264)+(328/325/258/256
/141/140/139)/(37)/(22)/(45)/(78)/(59)/(44)/(35)/(18)/(43)/(34)/(6)/(5)/(36)/(17)/(13)/best[ext=mp4][format_id!^=9][format_id!^=30]/best[format_id!^=9][format_id!^=30]', '--write-description', '--write-info-json']
[debug] Command-line args: ['--write-pages', '--config-location', 'd:\\configwtf.txt', 'https://www.youtube.com/feed/subscriptions?disable_polymer=1']
[debug] Encodings: locale cp1252, fs mbcs, out cp65001, pref cp1252
[debug] youtube-dl version 2019.11.28
[debug] Python version 3.4.4 (CPython) - Windows-7-6.1.7601-SP1
[debug] exe versions: ffmpeg N-94664-g0821bc4eee, ffprobe N-94664-g0821bc4eee
[debug] Proxy map: {}
[youtube:subscriptions] Downloading login page
[youtube:subscriptions] Saving request to None_https_-_accounts.google.com_ServiceLogindisable_polymer=true.dump
[youtube:subscriptions] Looking up account info
[youtube:subscriptions] Saving request to None_https_-_accounts.google.com_signin_sl_lookupdisable_polymer=true.dump
[youtube:subscriptions] Logging in
WARNING: Unable to log in: HTTP Error 400: Bad Request
[youtube:subscriptions] Youtube Subscriptions: Downloading webpage
[youtube:subscriptions] Saving request to Youtube_Subscriptions_https_-_accounts.google.com_ServiceLoginpassive=true_continue=https%3A%2F%2Fwww.youtube.com%2Fsignin%3Fnext%3D%252Ffeed%252Fsubscriptions%253Fdisable_polymer%253Dtrue%26action_handle_89befbc66839108656dc7afdaca2fcd4.dump
[download] Downloading playlist: Youtube Subscriptions
[youtube:subscriptions] playlist Youtube Subscriptions: Downloading 0 videos
[download] Finished downloading playlist: Youtube Subscriptions

Description

Youtube-dl has been working fine for quite a long time, but about a week or so ago began failing to log in, with the message "Warning: Unable to login: Invalid password". None of the open or closed issues helped address this, and I jumped through a bunch of hoops trying to resolve that error. But after clearing my browser cookies, removing all accounts from google but the one I'm trying to use, and saving those cookies to a file, I'm getting a different error... nor sure if that's progress or not :|

The documentation says that a 400 BAD REQUEST usually means a corrupt cookie file. But deleting the cookie file and allowing ytdl to recreate it gives me the same response - 400 BAD REQUEST. I've I've gone over the cookie file I'm trying to use, and everything looks fine, anyway. I've made sure the user agent string for ytdl matches the user agent string for my browser, and I've tried using the default user agent string in ytdl.

Logging in through my browser works perfectly fine. YTDL works perfectly fine to d/l individual videos that don't need me to supply a username/pw. But trying to d/l any video or playlist using my username and pw gives me a 400 BAD REQUEST on the login.

What else can I try/where do I go next? I'd love to see the request that's being sent, but I don't see anywhere ytdl supports dumping that.

.

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
3 participants
You can’t perform that action at this time.