Skip to content

Instantly share code, notes, and snippets.

@davidu
Created July 14, 2011 20:47
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davidu/1083406 to your computer and use it in GitHub Desktop.
Save davidu/1083406 to your computer and use it in GitHub Desktop.
How I get my tickets the TC party...
#!/usr/bin/python
### INSTRUCTIONS ###
# 1. Make sure techcrunch.py is executable.
# 2. Put the following two lines into cron...
## MAILTO="1234567890@mobile.mycingular.com"
## * * * * * /path/to/techcrunch.py
# 3. Turn off the cronjob after you get your tickets.
# 4. Say hi to David Ulevitch <david at opendns dot com> at the party.
# 5. Come to the OpenDNS 5 year birthday the night before: bit.ly/opendns-party
import urllib2, sys
from BeautifulSoup import BeautifulSoup
id = '11113455' #techcrunch party only
url = 'http://mobilefirstcrunchupandaugustcapitalparty2011.eventbrite.com/'
page = urllib2.urlopen(url)
soup = BeautifulSoup(page)
s = soup.find('input', attrs={'name':'cost_'+id})
if s:
t = s.findNext('select', attrs={'name' : 'quant_'+id})
if t:
print "There are tickets to the TechCrunch Party! http://bit.ly/iic8pj"
else:
sys.exit(1)
else:
sys.exit(1)
@redhotpenguin
Copy link

A line of amusing feedback...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment