Skip to content

Instantly share code, notes, and snippets.

@benburton
Created February 24, 2012 00:07
Show Gist options
  • Save benburton/1895967 to your computer and use it in GitHub Desktop.
Save benburton/1895967 to your computer and use it in GitHub Desktop.
Script that lets you know if you drink for free at Antarctica this month!
#!/usr/bin/env python
import sys
import urllib2
from lxml import etree
from pyquery import PyQuery as pq
if len(sys.argv) != 2:
print "Usage: ./antparse.py name"
else:
name = sys.argv[1]
d = pq(url = "http://antarcticabar.com/NameNight.html")
if d("font:contains('%s')" % name).length > 0:
print "It's your Ant month!"
else:
print "Better luck next time."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment