Skip to content

Commit

Permalink
Update scraper.py
Browse files Browse the repository at this point in the history
  • Loading branch information
majupi committed Jan 25, 2018
1 parent dd98325 commit 293ce39
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scraper.py
Expand Up @@ -14,14 +14,17 @@
#
# # Find something on the page using css selectors
root = lxml.html.fromstring(html)
names = root.cssselect("td div a")
names = root.cssselect("td div")
for i in names:
print i.attrib['href']
print i.text.encode("ascii", "ignore")
record['link'] = i.attrib['href']
record['name'] = i.text.encode("ascii", "ignore")
print record
scraperwiki.sqlite.save(unique_keys=['link','name'], data=record) # this saves the data in a way you can download it.






Expand Down

0 comments on commit 293ce39

Please sign in to comment.