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 login code outdated #658

Closed
kull0rk3x opened this issue Jan 28, 2013 · 5 comments
Closed

Youtube login code outdated #658

kull0rk3x opened this issue Jan 28, 2013 · 5 comments
Assignees
Labels
bug

Comments

@kull0rk3x
Copy link

@kull0rk3x kull0rk3x commented Jan 28, 2013

The code used for signing in to Youtube seems to be outdated. I tried to log in using

wget --output-document login.html --post-data "current_form=loginForm&next=/&action_login=Log In&username=foo&password=bar" --save-cookies /tmp/wget.cookies "https://www.youtube.com/signup?next=/&gl=US&hl=en"

(URL and form data taken from InfoExtractors.py - lines 154 & 319-325) and got forwarded to https://www.youtube.com/oops. The page at https://www.youtube.com/oops does not contain the word loginForm, which is why the warning about youtube-dl being unable to log in never gets printed.
If you paste https://www.youtube.com/signup?next=/&gl=US&hl=en into your webbrowser you'll get forwarded to the new signup/sign in page on http://accounts.google.com.

@kull0rk3x
Copy link
Author

@kull0rk3x kull0rk3x commented Jan 30, 2013

http://pastebin.com/FHvwnaUh

This seems to work for me. The argument to option _utf8 in the login form is Unicode character U+9731, I just couldnt get chr() or unichr() to work.

By the way, the URL for setting the language still works, however the age verification URL forwards to /oops.
However, I havent needed to verify my age since years so I dont know what the current URL is/if you still need to do verify the age at all.

@kull0rk3x
Copy link
Author

@kull0rk3x kull0rk3x commented Feb 6, 2013

Do you need any more testing/info on this, or is a .diff file not what you want for code submits?
This should be easily fixable but nobody has ever commented on it.

@phihag
Copy link
Contributor

@phihag phihag commented Feb 6, 2013

Thanks for the report and code contribution. We usually like pull requests (because it allows inline commenting here), but patches are fine as well. I'll merge your diff (with minor changes for Python 2 compatibility).

@ghost ghost assigned phihag Feb 6, 2013
@phihag
Copy link
Contributor

@phihag phihag commented Feb 6, 2013

Mmm, login works fine for me with a native youtube account. Trying with a google acccount ...

@phihag
Copy link
Contributor

@phihag phihag commented Feb 6, 2013

Oops, wrong test. This patch indeed fixes the login, thanks! Applied with minor changes.

@phihag phihag closed this in d3f5f9f Feb 6, 2013
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
2 participants
You can’t perform that action at this time.