Skip to content

Instantly share code, notes, and snippets.

@rmanly
Created November 25, 2013 21:01
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 rmanly/7648823 to your computer and use it in GitHub Desktop.
Save rmanly/7648823 to your computer and use it in GitHub Desktop.
Playing with my food
import requests
import webbrowser
from bs4 import BeautifulSoup
page = requests.get('http://xkcd.com')
soup = BeautifulSoup(page.text)
comic = soup.find(id='comic').img['src']
webbrowser.open(comic)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment