Bug 11566 - A provider for arcor.de
: A provider for arcor.de
Status: RESOLVED FIXED
Product: www2sms
Providers
: unspecified
: All Maemo
: Low enhancement (vote)
: ---
Assigned To: Bjoern Olausson
: general
:
:
:
:
  Show dependency tree
 
Reported: 2010-11-12 01:06 UTC by Nico Lehmann
Modified: 2010-11-17 16:38 UTC (History)
1 user (show)

See Also:


Attachments
a Python script to demonstrate the functionality of a arcor.de provider (2.45 KB, text/x-python)
2010-11-12 01:09 UTC, Nico Lehmann
Details
My attempted to write a provider (21.60 KB, text/x-python)
2010-11-12 01:23 UTC, Nico Lehmann
Details
arcor.de - proper (2.68 KB, text/plain)
2010-11-17 02:08 UTC, Bjoern Olausson
Details


Note

You need to log in before you can comment on or make changes to this bug.


Description Nico Lehmann (reporter) 2010-11-12 01:06:31 UTC
Arcor.de also provides free sms, so I tried to write a provider based on your
code. My Standalone test Script works well, but I couldn't get it working on
the n900.
Comment 1 Nico Lehmann (reporter) 2010-11-12 01:09:06 UTC
Created an attachment (id=3180) [details]
a Python script to demonstrate the functionality  of a arcor.de provider
Comment 2 Nico Lehmann (reporter) 2010-11-12 01:23:01 UTC
Created an attachment (id=3181) [details]
My attempted to write a provider

It should be to hard to get it working and I would really appreciate it.

Cheers Nico
Comment 3 Bjoern Olausson 2010-11-12 12:25:11 UTC
(In reply to comment #2)
> Created an attachment (id=3181) [details] [details]
> It should be to hard to get it working and I would really appreciate it.
> 

Since it requires a  login I can't really help, so where's the problem?

Get the latest www2sms (1.2.0) from bug #11427 append your provider and then
show some errors or whatever you are struggling on.

I'll try to help as much as possible to get it flying.

Cheers
Bjoern
Comment 4 Nico Lehmann (reporter) 2010-11-17 00:37:14 UTC
Hi Bjoern,
I installed Version 1.2 and removed my stupid return statement from the code.
Now it is running without an interpreter error, but in step 5 when I try to
submit the form :
    try:
      br.select_form(name='smsform')
      br.form['empfaengerAn'] = number
      br.form['nachricht'] = SMSTEXT.encode(br.encoding())
      req = br.click(type="submit", nr=1)
      br.open(req)
    except:
      return False, 'Error submitting SMS form'
I always run in the False case and get:
'Error submitting SMS form'

but the same code is working fine in my standalone python script.
btw. I created a test account. The account has 3 free sms (I guess per month)
username: arcorsmstest
pass: 123456test
Comment 5 Bjoern Olausson 2010-11-17 00:43:54 UTC
It would  be interesting which Exception mechanize throws.
Comment 6 Bjoern Olausson 2010-11-17 00:58:12 UTC
YOu might want to add ad a check for "Ich möchte diese Seite nicht mehr sehen!"
advertisemnt. Either notify the user that he as to check the box or just hit
the "weiter" button with mechanize. Your choice (I would catch that case and
automatically hit the "weiter" button)
Comment 7 Bjoern Olausson 2010-11-17 00:59:56 UTC
Here's the src for the first login:

            <div align="right">
                <input type="checkbox" name="nopromo" class="check"
title="Seite nicht mehr anzeigen">&nbsp;
                Ich möchte diese Seite nicht mehr
sehen!&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <input type="submit" name="weiter" value="Weiter"
class="button" title="Weiter">&nbsp;&nbsp;
            </div>
            <input type="hidden" name="goto"  
value="http://www.arcor.de/ums/ums_titel.jsp">
            <input type="hidden" name="linkaction" value="">
            <input type="hidden" name="linkurl"    value="">
            <input type="hidden" name="firstVisitOfPage" value="foo">
Comment 8 Bjoern Olausson 2010-11-17 02:08:08 UTC
Created an attachment (id=3198) [details]
arcor.de - proper

Your preliminary work was nearly working and I had some spare time so I fixed
it.

Arcor is now working and will be included in www2sms-1.2.0
(One SMS is left in the account. Two were successfully send with www2sms and
received on my phone)

I attached the code so you can append it to www2sms_providers.py.

Please test and report back.

Cheers
Bjoern
Comment 9 Nico Lehmann (reporter) 2010-11-17 11:15:44 UTC
Thanks Bjoern, it works fine for me now. 
If you want to add my E-Mail address it is kingpin- ät gmx.de

Cheers, 
   Nico
Comment 10 Bjoern Olausson 2010-11-17 13:44:51 UTC
kingpin with the "-":
[kingpin-][@][gmx][.de]
or
[kingpin][@][gmx][.de]
Comment 11 Nico Lehmann (reporter) 2010-11-17 16:38:40 UTC
unfortunately I wasn't fast enough for so it is really :
[kingpin-][@][gmx][.de]