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.


nate

6473 posts

Uber Geek
+1 received by user: 458

Retired Mod
Trusted
Lifetime subscriber

#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
hads
392 posts

Ultimate Geek
+1 received by user: 12

Trusted

  #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]






nate

6473 posts

Uber Geek
+1 received by user: 458

Retired Mod
Trusted
Lifetime subscriber

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

Great, just what I was looking for.

Thanks Hadley

Create new topic








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.