Carlilock time remaining script

This is the place for general discussions on fetishes, sexuality and anything else. What's on your mind right now?
Post Reply
Handcuffed
Explorer At Heart
Explorer At Heart
Posts: 128
Joined: Mon Jun 21, 2010 1:56 am

Carlilock time remaining script

Post by Handcuffed »

Hello,

I wrote a little Python script to check the time remaining on Carlilock. Note that if you have any penalties set for checking the remaining time it will trigger them.

It requires Python 2.7 and the mechanize library. You have to replace USER and PASS below with your username and password (make sure to leave the quotation marks!), respectively. By default it will suppress the minutes and seconds. I hereby release it into the public domain.

Code: Select all

#!/usr/bin/pythonimport cookielibimport re import mechanize finder = re.compile(r'View Remaining Time</h2>\n\n    <p>\n        (.+?).\n') usr = 'USER'pwd = 'PASS' login_url = 'http://carlilock.com/login.php'br = mechanize.Browser()cj = cookielib.CookieJar()br.set_cookiejar(cj)br.addheaders = [('User-agent', 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0.2) Gecko/20100101 Firefox/6.0.2')]br.open(login_url)br.select_form(predicate=lambda f: 'id' in f.attrs and f.attrs['id'] == 'login')br.form['txtUserId'] = usrbr.form['txtPassword'] = pwdbr.submit()br.open('http://carlilock.com/remaining.php')text = br.response().read()res = finder.findall(text)[0].strip()print res[:res.index('hours') + 5]
Here's how I have it set up on my computer (with Conky):

Image

A constant reminder of my chastity!

If you have any problems with the script please let me know.
Post Reply