Created
May 3, 2016 09:14
-
-
Save daltonmenezes/c1fac5e521da7a8bf310a4e02d4934d0 to your computer and use it in GitHub Desktop.
simple crawler for a title on a specific profile on IMDB.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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