Helo i have problem with my script.
His is html code from website http://free.os.pl where I have email
Login:
Password:HTML Code:<input tabindex="-1" style="width:224px; font-size:12px;" class="wm_input" type="text" value="" id="inc_login" name="inc_login" maxlength="255" onfocus="this.className = 'wm_input_focus';" onblur="this.className = 'wm_input';">
this is my 1st code - not working:HTML Code:<input tabindex="3" style="width:224px; font-size:12px;" class="wm_input wm_password_input" type="password" value="" id="password" name="password" maxlength="255" onfocus="this.className = 'wm_input_focus wm_password_input';" onblur="this.className = 'wm_input wm_password_input';">
And 2nd code - not working:Code:// JavaScript Document function initHandler(handler){ handler.name="MyMail"; this.dataURL="http://free.os.pl"; this.loginData=["http://free.os.pl/index.php?mode=submit","name","password","key="+encodeURIComponent("abc=12")]; this.mailURL="http://free.os.pl"; } function getCount(aData){ //aData is a html source in dataURL var fnd=aData.match(/\"folders\":\[{\"id\":1.+?\"unread\":(\d+)/); //find mail count if(fnd){ var num; //get mail count here return num; }else{ return -1;//display 'not checked' message } }
PLZ HelpCode:/********************************************************** INTERIA.PL **********************************************************/ var name="INTERIA.PL"; var ver="2010-11-12"; function init(){ this.initStage=ST_PRE; this.loginData=["http://free.os.pl/index.php?mode=submit","email","password"]; this.dataURL="http://free.os.pl"; this.mailURL="http://free.os.pl"; this.mailDomain="free.os.pl"; } function getCount(aData){ var fnd=aData.match(/\"folders\":\[{\"id\":1.+?\"unread\":(\d+)/); if(fnd){ return fnd[1]; }else{ fnd=aData.match(/Odebrane<\/a>.+?\((?:(\d+)\/)?\d+?\)/); if(fnd)return fnd[1]?fnd[1]:0; else return -1; } } function process(aHttpChannel, aData) { switch(this.stage){ case ST_PRE: this.stage=ST_LOGIN; this.getHtml("http://free.os.pl/"); return true; } return this.baseProcess(aHttpChannel, aData); }
Whats wrong with this code???


Reply With Quote

Bookmarks