Skip to content

Instantly share code, notes, and snippets.

@philn
Created January 14, 2013 11:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save philn/4529428 to your computer and use it in GitHub Desktop.
Save philn/4529428 to your computer and use it in GitHub Desktop.
Commit message generator
#!/usr/bin/env python
import urllib2, BeautifulSoup
url = "http://whatthecommit.com/"
data = urllib2.urlopen(url).read()
soup = BeautifulSoup.BeautifulSoup(data)
msg = soup.findAll("div", attrs={"id":"content"})[0].findAll("p")[0].text
print msg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment