Jump to content

Youtube Login


arryo
 Share

Recommended Posts

Hi,

For my new Script I want it to login at Youtube. But I dont really know how to do it. Here is my code:

$acc = "thelulz"
$pw = "doesnt exist. i know this will fail."


$mIE = _IECreate ("www.youtube.com")
; here is something to check out if the user is already logged in.
; ---> he is not
_IENavigate ($mIE, "http://www.youtube.com/login")

$oForm = _IEFormGetObjByName($mIE, "loginform")

$oUsername = _IEFormElementGetObjByName($oForm, "Email") ; <--- i think this is the error

_IEFormElementSetValue($oUsername, $acc)

$oPasswd = _IEFormElementGetObjByName($oForm, "Passwd")  ; <--- i think this is the error

_IEFormElementSetValue($oPasswd, $pw)

_IEFormSubmit($oForm)

Exit

ofc I included <IE.au3>.

Edited by arryo
Link to comment
Share on other sites

$acc = 
$pw = 


$mIE = _IECreate ("www.youtube.com")
; here is something to check out if the user is already logged in.
; ---> he is not
_IENavigate ($mIE, "http://www.youtube.com/login")

$oForm = _IEFormGetObjByName($mIE, "gaia_loginform")

$oUsername = _IEFormElementGetObjByName($oForm, "Email") ; <--- i think this is the error

_IEFormElementSetValue($oUsername, $acc)

$oPasswd = _IEFormElementGetObjByName($oForm, "Passwd")  ; <--- i think this is the error

_IEFormElementSetValue($oPasswd, $pw)

$oSignIn = _IEFormElementGetObjByName($oForm, "signIn")

_IEAction($oSignIn,"click")

Exit

Just put the username/password in again..

The things i noticed were...the form is not called loginform, its called "gaia_loginform"

Also, i dont use the formsubmit thing, ive never managed to get it to work properly, so i just use the _ieaction.

I managed to login in properly with my credentials, so this works.

EDIT: Although just tried the formsubmit then and it works :)...so you can change that back if you want..either way works.

Edited by furrycow
Instant Lockerz Invite - www.instantlockerzinvite.co.uk
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...