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] Cannot log in with TFA #10378

Closed
ironiridis opened this issue Aug 18, 2016 · 5 comments
Closed

[youtube] Cannot log in with TFA #10378

ironiridis opened this issue Aug 18, 2016 · 5 comments

Comments

@ironiridis
Copy link

@ironiridis ironiridis commented Aug 18, 2016

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2016.08.19. If it's not read this FAQ entry and update. Issues with outdated version will be rejected.

  • I've verified and I assure that I'm running youtube-dl 2016.08.19

Before submitting an issue make sure you have:

What is the purpose of your issue?

  • Bug report (encountered problems with youtube-dl)
$ ~/bin/youtube-dl -v -s "https://www.youtube.com/watch?v=MZUkG0OnSaA" 
[debug] System config: []
[debug] User config: ['-n', '--cookies', '~/.cache/youtube-dl.cookiejar', '--yes-playlist', '--console-title', '--add-metadata', '--mark-watched']
[debug] Command-line args: ['-v', '-s', 'https://www.youtube.com/watch?v=MZUkG0OnSaA']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2016.08.19
[debug] Python version 3.4.5 - Linux-4.7.0-vanilla+-x86_64-Intel-R-_Core-TM-2_Duo_CPU_P8600_@_2.40GHz-with-gentoo-2.2
[debug] exe versions: ffmpeg 2.8.7, ffprobe 2.8.7
[debug] Proxy map: {}
[youtube] Downloading login page
[youtube] Logging in
[youtube] Submitting TFA code
WARNING: Two-factor code expired or invalid. Please try again, or use a one-use backup code instead.
[youtube] MZUkG0OnSaA: Downloading webpage
[youtube] MZUkG0OnSaA: Downloading video info webpage
[youtube] MZUkG0OnSaA: Extracting video information
[youtube] MZUkG0OnSaA: Downloading MPD manifest
[youtube] MZUkG0OnSaA: Marking watched

I have captured the output of --dump-pages, compressed and uploaded it to my Google Drive Link removed

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Aug 18, 2016

image

@dstftw dstftw closed this Aug 18, 2016
@ironiridis
Copy link
Author

@ironiridis ironiridis commented Aug 18, 2016

Would it be possible for youtube-dl to indicate this somehow? I'm guessing this happened because I attempted to download a playlist and the TFA token was only valid for the first item.

@ironiridis
Copy link
Author

@ironiridis ironiridis commented Aug 19, 2016

I'd like to re-open this; I think I know what's going on.

I captured a new --dump-pages log. I went ahead and extracted the request responses and viewed them (honestly didn't think or realize that was a thing to do) and saw this:

2016-08-19-144639_1280x800_scrot

So unfortunately this seems we either need a way to specifically request code-based TFA, or detect this situation and abort. Critically, my phone did not prompt me to log in, so I'm wondering if Google is doing something here to try to detect automated login attempts... but that's another issue entirely.

I wonder if it would be feasible to have a --launch-browser-for-login=/usr/bin/whatever switch, where a user could specify they want youtube-dl to exec /usr/bin/whatever with the URL to complete login and obtain a token? Maybe to make this more generic and not require special-purpose hacks for each extractor.

@ironiridis
Copy link
Author

@ironiridis ironiridis commented Aug 19, 2016

And just to verify, when I disabled the phone TFA option in my account and reverted to code-based TFA, youtube-dl worked immediately.

@tommcintyre
Copy link

@tommcintyre tommcintyre commented Jul 22, 2017

Paging @dstftw - this still seems to be happening (the situation described by @ironiridis above). Can this issue be reopened?

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.