Notices


Reply
Thread Tools
ejasmudar's Avatar
Posts: 800 | Thanked: 957 times | Joined on Sep 2010 @ India
#181
Ok, so now I am at 'Error logging in'. I don't really know what the problem is as there are no errors in terminal. But i think its because the form in the main page has no name only id. I tried
Code:
br.select_form(nr=0)
but still no improvement.

I also installed the google desktop and sdk and went through the widget/gadget that I mentioned earlier. It is in javascript and from what i understand, there is an alternate API to access the site. I am attaching the codes, could you please take a look at it?

Thanks
Attached Files
File Type: txt 160by2 gadget.txt (6.5 KB, 111 views)
 
blubbi's Avatar
Posts: 288 | Thanked: 113 times | Joined on Dec 2009 @ Germany
#182
Originally Posted by ejasmudar View Post
I am still trying with the scraping technique (mostly because i did some work on it already).

My first error was "global name 'number' not defined"
This was in line
Code:
num = number[3:]
I dunno if its right, but nevertheless, i modifies number to num and the error goes away.

Next I am getting error "global name 'cookielib' is not defined".

I have a feeling i'm missing something here and that these two are related. What happened? is some file with global variables missing?

EDIT: OK, i imported cookielib and error went away. Was that a bug? Anyway now i am stuck at login error.
Mechanize handles cookies also without the cookielib, you can drop the two line:
Code:
cj = cookielib.LWPCookieJar()
br.set_cookiejar(cj)
The code you used as template is not written by me and I don't have an account, so i couldn't check. But it looks like a bug. I'll remove those lines from "provider_vodafone_nl" as well.

To make things easier you can install the "Web-Developer" Plugin for Firefox it can help you to show the name for the forms and fields on the target website.

Please post error messages and the part of the code which generates the error so I/we can help.

Cheers
Bjoern
 
blubbi's Avatar
Posts: 288 | Thanked: 113 times | Joined on Dec 2009 @ Germany
#183
Originally Posted by ejasmudar View Post
Ok, so now I am at 'Error logging in'. I don't really know what the problem is as there are no errors in terminal. But i think its because the form in the main page has no name only id. I tried
Code:
br.select_form(nr=0)
but still no improvement.

I also installed the google desktop and sdk and went through the widget/gadget that I mentioned earlier. It is in javascript and from what i understand, there is an alternate API to access the site. I am attaching the codes, could you please take a look at it?

Thanks
Looks like these two URLs are what you are looking for.
Try the URLs within your browser (fill variables with your login, password, message and userid)

If it works, use telbo as a template.

This URL should do the login:
Code:
login_url = "http://www.160by2.com/Widget/Comman.asp?RT=LC&txtUN=%s&txtPWD=%s&SIZE_ID=2&userid=" %s(LOGIN, PASSWORD)
Thise one should send the SMS after the login:
Code:
send_url = "http://www.160by2.com/Widget/Comman.asp?RT=SC&txtMNO=%s&txtMSG=%s&SIZE_ID=2&userid=%s" %(UNKNOWN, MESGTEXT, USERID)
You might want to log out... but not really necessary:
Code:
logout_url="http://www.160by2.com/Widget/Comman.asp?RT=LO&userid=%s" %(USERID)
Youe have to figure out what LOGIN, UNKNOWN and USERID represent.
But this should not be that hard ;-) check the functions "dologin", "dosms" in 160by2_gadget.txt

Cheers
Bjoern
 

The Following 2 Users Say Thank You to blubbi For This Useful Post:
ejasmudar's Avatar
Posts: 800 | Thanked: 957 times | Joined on Sep 2010 @ India
#184
I am sending u a PM with my usrname/password. Please use that to check the site.

The problem with scraping is that the app can't seem to find my login form from the page.

By using those URLs from the javascript file, I am not able to send sms, not get a confirmation of login. Could you please check on this? Thanks.
 
Posts: 35 | Thanked: 1 time | Joined on Dec 2009
#185
Björn,

currently the application only picks the number labeld "cell phone" from the address book. The numbers labeld "cell phone (work)" and "cell phone (private)" are not available. Could you make these numbers available, too?
 
alex9999's Avatar
Posts: 5 | Thanked: 1 time | Joined on Sep 2010 @ Milan
#186
@blubbi

I sent you an email, but you didn't answer me yet... I took your email address from provider configuration file of the application: maemo@olausson.de
is it wrong?
we really need your help, thanks in advance
 
blubbi's Avatar
Posts: 288 | Thanked: 113 times | Joined on Dec 2009 @ Germany
#187
Hi, sry for my long absence. Again a lot of work is keeping me from www2sms :-(

About adding all MOBILE(AAA, BBB, CCC)-number entries.
-> If I can filter out these, I'll realize it in the next release.

Thanks for the hint (I have only numbers in the plain MOBILE category)

Cheers,
Bjoern
 
blubbi's Avatar
Posts: 288 | Thanked: 113 times | Joined on Dec 2009 @ Germany
#188
Originally Posted by alex9999 View Post
@blubbi

I sent you an email, but you didn't answer me yet... I took your email address from provider configuration file of the application: maemo@olausson.de
is it wrong?
we really need your help, thanks in advance
Well the address is correct, but your message was scored as spam so. After I read your post here I discovered it in the spam folder.

I'll keep in touch with you!
 
Posts: 35 | Thanked: 1 time | Joined on Dec 2009
#189
Thanks for trying to implement the additional cell phone numbers!
 
Posts: 35 | Thanked: 1 time | Joined on Dec 2009
#190
Is it only me or does any one else receive the error message "failed to load myo2"???
 
Reply


 
Forum Jump


All times are GMT. The time now is 20:11.