Skip to content

Instantly share code, notes, and snippets.

@daltonmenezes
Created May 3, 2016 09:14
Show Gist options
  • Save daltonmenezes/c1fac5e521da7a8bf310a4e02d4934d0 to your computer and use it in GitHub Desktop.
Save daltonmenezes/c1fac5e521da7a8bf310a4e02d4934d0 to your computer and use it in GitHub Desktop.
simple crawler for a title on a specific profile on IMDB.
from lxml import html
import requests
page = requests.get('http://www.imdb.com/title/tt0944947/')
tree = html.fromstring(page.content)
title = tree.xpath('//h1[@itemprop="name"]/text()')[0]
print title
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment