Repository: youtube-dl
Issue: Cannot download YouTube Red video because TFA rejected
Labels: cant-reproduce

## Please follow the guide below

- You will be asked some questions and requested to provide some information, please read them **carefully** and answer honestly
- Put an `x` into all the boxes [ ] relevant to your *issue* (like that [x])
- Use *Preview* tab to see how your issue will actually look like

---

### Make sure you are using the *latest* version: run `youtube-dl --version` and ensure your version is *2017.05.09*. If it's not read [this FAQ entry](https://github.com/rg3/youtube-dl/blob/master/README.md#how-do-i-update-youtube-dl) and update. Issues with outdated version will be rejected.
- [X] I've **verified** and **I assure** that I'm running youtube-dl **2017.05.09**

### Before submitting an *issue* make sure you have:
- [X] At least skimmed through [README](https://github.com/rg3/youtube-dl/blob/master/README.md) and **most notably** [FAQ](https://github.com/rg3/youtube-dl#faq) and [BUGS](https://github.com/rg3/youtube-dl#bugs) sections
- [X] [Searched](https://github.com/rg3/youtube-dl/search?type=Issues) the bugtracker for similar issues including closed ones

### What is the purpose of your *issue*?
- [X] Bug report (encountered problems with youtube-dl)
- [ ] Site support request (request for adding support for a new site)
- [ ] Feature request (request for a new functionality)
- [ ] Question
- [ ] Other

---

### The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your *issue*

---

### If the purpose of this *issue* is a *bug report*, *site support request* or you are not completely sure provide the full verbose output as follows:

Add `-v` flag to **your command line** you run youtube-dl with, copy the **whole** output and insert it here. It should look similar to one below (replace it with **your** log inserted between triple ```):
```
C:\Users\MYUSER>youtube-dl https://www.youtube.com/watch?v=PpG0z-npFIY -v
[debug] System config: []
[debug] User config: ['-o', '~/Downloads/youtube-dl/%(uploader)s/%(uploader)s - %(upload_date)s - %(title)s.%(ext)s', '-f', 'bestvideo[height<=2500]+bestaudio', '--write-sub', '-w', '--write-thumbnail', '--download-archive', 'C:\\Users\\MYUSER\\Dropbox\\Misc\\youtube-dl_archive.txt', '-R', '20', '-u', 'PRIVATE', '-p', 'PRIVATE']
[debug] Custom config: []
[debug] Command-line args: ['https://www.youtube.com/watch?v=PpG0z-npFIY', '-v']
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2017.05.09
[debug] Python version 3.4.4 - Windows-10-10.0.15063
[debug] exe versions: none
[debug] Proxy map: {}
[youtube] Downloading login page
[youtube] Looking up account info
[youtube] Logging in
Type 2-step verification code and press [Return]:
[youtube] Submitting TFA code
WARNING: Unable to submit TFA code: HTTP Error 500: Internal Server Error
WARNING: Unable to extract CheckCookie URL
[youtube] PpG0z-npFIY: Downloading webpage
[youtube] I6DKmXrC7YE: Downloading webpage
[youtube] I6DKmXrC7YE: Downloading video info webpage
[youtube] I6DKmXrC7YE: Extracting video information
[youtube] {22} signature length 40.43, html5 player vfljmjb-X
[youtube] I6DKmXrC7YE: Downloading player https://www.youtube.com/yts/jsbin/player-vfljmjb-X/en_US/base.js
[youtube] {43} signature length 40.43, html5 player vfljmjb-X
[youtube] {18} signature length 40.43, html5 player vfljmjb-X
[youtube] {36} signature length 40.43, html5 player vfljmjb-X
[youtube] {17} signature length 40.43, html5 player vfljmjb-X
[youtube] {137} signature length 38.43, html5 player vfljmjb-X
[youtube] I6DKmXrC7YE: Downloading player https://www.youtube.com/yts/jsbin/player-vfljmjb-X/en_US/base.js
[youtube] {248} signature length 40.43, html5 player vfljmjb-X
[youtube] {136} signature length 40.43, html5 player vfljmjb-X
[youtube] {247} signature length 40.43, html5 player vfljmjb-X
[youtube] {135} signature length 40.43, html5 player vfljmjb-X
[youtube] {244} signature length 40.43, html5 player vfljmjb-X
[youtube] {134} signature length 40.43, html5 player vfljmjb-X
[youtube] {243} signature length 40.43, html5 player vfljmjb-X
[youtube] {133} signature length 40.43, html5 player vfljmjb-X
[youtube] {242} signature length 40.43, html5 player vfljmjb-X
[youtube] {160} signature length 40.43, html5 player vfljmjb-X
[youtube] {278} signature length 40.43, html5 player vfljmjb-X
[youtube] {140} signature length 40.43, html5 player vfljmjb-X
[youtube] {171} signature length 40.43, html5 player vfljmjb-X
[youtube] {249} signature length 40.43, html5 player vfljmjb-X
[youtube] {250} signature length 40.43, html5 player vfljmjb-X
[youtube] {251} signature length 40.43, html5 player vfljmjb-X
[youtube] I6DKmXrC7YE: Downloading player https://www.youtube.com/yts/jsbin/player-vfljmjb-X/en_US/base.js
[youtube] I6DKmXrC7YE: Downloading MPD manifest
WARNING: [youtube] I6DKmXrC7YE: Skipping DASH manifest: ExtractorError('Failed to download MPD manifest: HTTP Error 403: Forbidden (caused by HTTPError()); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.',)
[info] Writing video subtitles to: C:\Users\MYUSER\Downloads\youtube-dl\vlogbrothers\vlogbrothers - 20170427 - Kedi - Free Preview.en.vtt
[youtube] I6DKmXrC7YE: Downloading thumbnail ...
[youtube] I6DKmXrC7YE: Writing thumbnail to: C:\Users\MYUSER\Downloads\youtube-dl\vlogbrothers\vlogbrothers - 20170427 - Kedi - Free Preview.jpg
WARNING: You have requested multiple formats but ffmpeg or avconv are not installed. The formats won't be merged.
WARNING: Requested formats are incompatible for merge and will be merged into mkv.
[debug] Invoking downloader on 'https://r6---sn-n4v7sn7z.googlevideo.com/videoplayback?clen=45162081&ip=71.93.87.21&usequic=no&ms=au&mt=1494471327&dur=132.757&mv=m&gir=yes&mm=31&ipbits=0&mn=sn-n4v7sn7z&initcwndbps=1181250&expire=1494493025&sparams=clen%2Cdur%2Cei%2Cgcr%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Ckeepalive%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Crequiressl%2Csource%2Cupn%2Cusequic%2Cexpire&ei=AdMTWdaYB4vH-AOtn6zYBA&itag=137&beids=%5B9466592%5D&mime=video%2Fmp4&pl=19&source=youtube&key=yt6&upn=0bosdK8oW2M&id=o-AIxDEQzyDsvaNSqeU9soVSh4DCT9MvgzrWBpNf3posPw&lmt=1493318750715618&requiressl=yes&gcr=us&keepalive=yes&signature=506FE07B9E19E6235481387DEA698FADFB5DD6.D45692D8787A9C2CFDD9D80BF05C61C3E1D8E42F&ratebypass=yes'
[download] Destination: C:\Users\MYUSER\Downloads\youtube-dl\vlogbrothers\vlogbrothers - 20170427 - Kedi - Free Preview.f137.mp4
[download]   4.6% of 43.07MiB at  3.75MiB/s ETA 00:10
ERROR: Interrupted by user

<end of log>
```

---

### Description of your *issue*, suggested solution and other information

Hi, youtube-dl is now rejecting my attempts to enter my two-factor code, making me unable to download a YouTube Red video. I add my username and password to my config file, and youtube-dl correctly asks for my two-factor, but it rejects it every time with the "HTTP Error 500: Internal Server Error" error. I have tried doing this on a separate computer with a separate internet connection, and I have tried using both my Authy token and a backup code token. I have also tried it manually without using any config file. This worked several months ago, so maybe something changed on the app's end or youtube's end? Thx!