Skip to content

Commit

Permalink
Update scraper.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Alice committed Jul 10, 2015
1 parent f4b1203 commit 3a63c45
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions scraper.py
Expand Up @@ -7,8 +7,11 @@
movieList = ["http://bechdeltest.com"+link.get('href') for link in root.cssselect("div[class='movie'] a:nth-of-type(3)")]

for link in movieList:
movieID = link.split("/")[3]
print movieID
htmlMovie = requests.get(link).text
rootMovie = lxml.html.fromstring(htmlMovie)
movieID = link.split("/")[4]
title = rootMovie.cssselect("h2 a").text_content()
print title
break
#movieTitle =
#year =
Expand Down

0 comments on commit 3a63c45

Please sign in to comment.