Skip to content

Instantly share code, notes, and snippets.

@davidu
Created July 16, 2010 04:13
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/477913 to your computer and use it in GitHub Desktop.
Save davidu/477913 to your computer and use it in GitHub Desktop.
Get tickets to the TechCrunch 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.
import urllib2
import re
from BeautifulSoup import BeautifulSoup
page = urllib2.urlopen("http://techcrunchsocialcurrencycrunchuandaugustcapitparty.eventbrite.com/")
soup = BeautifulSoup(page)
s = soup.find(attrs={'name' : "cost_9214327"}).findNext('b')
if s.string != 'Sold Out':
print "There are tickets to the TechCrunch Party! Buy them: http://bit.ly/d1AVi3"
@davidu
Copy link
Author

davidu commented Jul 16, 2010

I know there are much easier ways to do this. I just wanted to play with BeautifulSoup.

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