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 9, 2015
1 parent 2af4024 commit 9a9e29b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions scraper.py
Expand Up @@ -7,10 +7,12 @@
html = scraperwiki.scrape("http://bechdeltest.com/?list=all")
root = lxml.html.fromstring(html)

for el in root.cssselect("div[class='movie'] a")[2]:
title = el.text
print title
data = {
'Title' : [title.text_content() for title in root.cssselect("div[class= 'movie'] a ")][2]

scraperwiki.sqlite.save(unique_keys = ['Product'], data=data)

#for el in root.cssselect("div[class='movie'] a"):
#testsPassed = root.cssselect("//div[@class='movie']/a[1]/img/@alt")
#testComment = root.cssselect("//div[@class='movie']/a[2]/img/@title")
#bechdelUrl = root.cssselect("//div[@class='movie']/a[2]/@href")
Expand Down

0 comments on commit 9a9e29b

Please sign in to comment.