curl-users
login to youtube account
Date: Sat, 7 Nov 2009 13:29:02 +0530
Hi ,
I am trying to login/signup to youtube account using curl tool from command
line as well as through curl api.
The following is the login form and the url .
login_form = {
'current_form': 'loginForm',
'next': '/',
'action_login': 'Log In',
'username': username,
'password': password,
}
'http://www.youtube.com/signup?next=/&gl=US&hl=en'
I have tried with from command line as:
$curl -v -d Username=xxxxx:Password=xxxxx
http://www.youtube.com/signup?next=/&gl=US&hl=en
[1]
3186
[2]
3187
[2]+ Done
gl=In
[bhadraji.d_at_localhost curl]$ * About to connect() to proxy
proxy.xxxx.netport 3128 (#0)
* Trying 192.168.1.1...
connected
* Connected to proxy.xxxx.net (192.168.1.1) port 3128
(#0)
> POST http://www.youtube.com/signup?next=/HTTP/1.1
> User-Agent: curl/7.19.6 (i386-redhat-linux-gnu) libcurl/7.19.5
OpenSSL/0.9.8g zlib/1.2.3 libidn/0.6.14
libssh2/0.18
> Host: www.youtube.com
> Accept:
*/*
> Proxy-Connection:
Keep-Alive
> Content-Length:
38
> Content-Type: application/x-www-form-urlencoded
>
* HTTP 1.0, assume close after body
< HTTP/1.0 303 See Other
< Date: Sat, 07 Nov 2009 07:51:14 GMT
< Server: Apache
< X-Content-Type-Options: nosniff
< Set-Cookie: use_hitbox=72c46ff6cbcdb7c5585c36411b6b334edAEAAAAw; path=/;
domain=.youtube.com
< Set-Cookie: VISITOR_INFO1_LIVE=EgSMd_EvItk; path=/; domain=.youtube.com;
expires=Mon, 05-Jul-2010 07:51:14 GMT
< Set-Cookie: PREF=f1=10000000; path=/; domain=.youtube.com; expires=Tue,
05-Nov-2019 07:51:14 GMT
< Set-Cookie: GEO=98e3fd58afdb91a4faa75302d4c4847ecwsAAAAzSU47YQJ5SvUm8g==;
path=/; domain=.youtube.com
< Expires: Tue, 27 Apr 1971 19:44:06 EST
< Content-Length: 0
< X-YouTube-MID:
WkFSZzctYUFHdmdmUnp5VG9JZzdod0NDdnpSNFo4VzVSRzJkeklrTVgxNVQ0cWVWSGdkbVBB
< Cache-Control: no-cache
< Location:
https://www.google.com/accounts/LogoutWarning?continue=http%3A%2F%2Fwww.youtube.com%2Fcreate_account%3Fnext%3D%252F<mpl=sso&hl=hi-US&service=youtube
< Content-Type: text/html; charset=utf-8
< X-XSS-Protection: 0
< X-Cache: MISS from server.xxx.net
< X-Cache-Lookup: MISS from server.xxx.net:3128
< Via: 1.0 server.xxxx.net:3128 (squid/2.6.STABLE21)
* HTTP/1.0 proxy connection set to keep alive!
< Proxy-Connection: keep-alive
<
* Connection #0 to host proxy.xxxxx.net left intact
* Closing connection #0
I am not getting why its giving me logout warning .
Can anyone help me how to maintain cookiea after login and exact way to
login the youtube from the url:
http://www.youtube.com/signup?next=/&gl=US&hl=en'
Thanks ,
~Bhadraji.
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2009-11-07