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 9e1d6fa commit 255b444
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scraper.py
Expand Up @@ -16,9 +16,10 @@
root = lxml.html.fromstring(html)
names = root.cssselect("td div a")
for i in names:
# print i.attrib['href']
print i.attrib['href']
print i.text.encode('ascii', 'ignore')
record['link'] = i.attrib['href']
record['name'] = i.text.encode('ascii', 'ignore') # made to ignore special characters like ü,è,ä
# record['name'] = i.text.encode('ascii', 'ignore') # made to ignore special characters like ü,è,ä
print record
scraperwiki.sqlite.save(unique_keys=['link'], data=record) # this saves the data in a way you can download it.

Expand Down

0 comments on commit 255b444

Please sign in to comment.