Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


6324 posts

Uber Geek
+1 received by user: 390

Moderator
Trusted
Lifetime subscriber

Topic # 26634 28-Sep-2008 22:58
Send private message

Would be good to have an FF plugin or even just a webpage (under SSL) that you can send your username/password to and it gives you your currently usage (or even the data you have left).

Create new topic
389 posts

Ultimate Geek
+1 received by user: 11

Trusted

  Reply # 167687 29-Sep-2008 10:43
Send private message

This Python script will do it;

[code]
#!/usr/bin/python

import re
import urllib

USERNAME='you@snap.net.nz'
PASSWORD='your_password_here'

data = urllib.urlencode({
    'username': USERNAME,
    'password': PASSWORD,
})

page = urllib.urlopen('https://www.snap.net.nz/', data).read()

m = re.compile('you have used (\d{1,3}\.\d) GB out of (\d{1,3}\.\d) GB.').search(page)

if m:
    print 'You have used %s out of %s (%s remaining).' % (m.group(1), m.group(2), float(m.group(2)) - float(m.group(1)))

[/code]






6324 posts

Uber Geek
+1 received by user: 390

Moderator
Trusted
Lifetime subscriber

  Reply # 167691 29-Sep-2008 10:56
Send private message

Great, just what I was looking for.

Thanks Hadley

Create new topic

Twitter »

Follow us to receive Twitter updates when new discussions are posted in our forums:



Follow us to receive Twitter updates when news items and blogs are posted in our frontpage:



Follow us to receive Twitter updates when tech item prices are listed in our price comparison site:



Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.

Alternatively, you can receive a daily email with Geekzone updates.