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

Cannot download private YT videos on brand new accounts or accounts with 2FA #3533

Closed
riking opened this issue Aug 16, 2014 · 1 comment
Closed

Comments

@riking
Copy link
Contributor

@riking riking commented Aug 16, 2014

Logging in does not allow you to download private Youtube videos as an account with 2-Factor Auth enabled.

Attempt 1. Created a new google account, shared the video with it.

kane@newlaptop:~/Videos$ youtube-dl -u riking.ytdl.issue.report@gmail.com -p 2U4XTF24E4 http://youtu.be/HUTXjZtt4Io
[youtube] Setting language
[youtube] Downloading login page
[youtube] Logging in
[youtube] Confirming age
[youtube] HUTXjZtt4Io: Downloading webpage
[youtube] HUTXjZtt4Io: Downloading video info webpage
ERROR: HUTXjZtt4Io: YouTube said: This video is private.

Note that this by itself is problematic - it says that we successfully signed in, but the video is private?! A better error message would be nice.

Attempt 2. Enabled "access for less secure apps".

kane@newlaptop:~/Videos$ youtube-dl -u riking.ytdl.issue.report@gmail.com -p 2U4XTF24E4 http://youtu.be/HUTXjZtt4Io
[youtube] Setting language
[youtube] Downloading login page
[youtube] Logging in
[youtube] Confirming age
[youtube] HUTXjZtt4Io: Downloading webpage
[youtube] HUTXjZtt4Io: Downloading video info webpage
[youtube] HUTXjZtt4Io: Extracting video information
[download] Destination: youtube dl test video-HUTXjZtt4Io.mp4
[download] 100% of 46.16KiB in 00:00

This seems to work.

Attempt 3. Enabled 2FA.
Google Authenticator shared secret: xha7 ryxa d6ah dk6t wxw5 5mq3 cxxj 2f25

kane@newlaptop:~/Videos$ youtube-dl -u riking.ytdl.issue.report@gmail.com -p 2U4XTF24E4 http://youtu.be/HUTXjZtt4Io
[youtube] Setting language
[youtube] Downloading login page
[youtube] Logging in
[youtube] Confirming age
[youtube] HUTXjZtt4Io: Downloading webpage
[youtube] HUTXjZtt4Io: Downloading video info webpage
ERROR: HUTXjZtt4Io: YouTube said: This video is private.

Attempt 4. Using application-specific password, generated as "Youtube on my Windows Computer"
plwwtjwpaedjxurz

kane@newlaptop:~/Videos$ youtube-dl -u riking.ytdl.issue.report@gmail.com -p plwwtjwpaedjxurz http://youtu.be/HUTXjZtt4Io
[youtube] Setting language
[youtube] Downloading login page
[youtube] Logging in
WARNING: unable to log in: bad username or password
[youtube] HUTXjZtt4Io: Downloading webpage
[youtube] HUTXjZtt4Io: Downloading video info webpage
ERROR: HUTXjZtt4Io: YouTube said: This video is private.

At this point, "Access for less secure apps" is not available.


Acceptable solutions include (not limited to) having youtube-dl ask for a 2FA code or an application-specific password. However, it seems they clearly expect a different login path for the app-specific passwords.

Also an issue is that it doesn't work for brand-new accounts, either.


I'm not quite sure what Google is expecting the app to do, but it's clearly something different.

Please refrain from using this test account for anything other than trying to download the private video named above. Also please refrain from calling my phone number.

I can add more accounts to the permitted list on request. The video is just a short clip of a text editor containing the account's password.

@riking riking changed the title Cannot download private videos on accounts with 2FA Cannot download private YT videos on brand new accounts or accounts with 2FA Aug 16, 2014
@riking
Copy link
Contributor Author

@riking riking commented Aug 16, 2014

Was browsing around developers.google.com and found the deprecated ClientLogin interface - I think this might be what takes the app passwords. https://developers.google.com/accounts/docs/AuthForInstalledApps

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.

1 participant
You can’t perform that action at this time.