Skip to content

Commit

Permalink
Update scraper.py
Browse files Browse the repository at this point in the history
  • Loading branch information
peruvs committed May 22, 2015
1 parent 4321398 commit a8d2b85
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scraper.py
Expand Up @@ -13,9 +13,10 @@
address = root.cssselect('address')
phone = root.cssselect('span.biz-phone')


index = 1
for i in range(len(name)):
scraperwiki.sqlite.save(data={
scraperwiki.sqlite.save(unique_keys=["pk"], data={
'pk': index++,
'name': name[i].text.encode('utf8'),
'address': address[i].text.encode('utf8'),
'phone': phone[i].text.encode('utf8'),
Expand Down

0 comments on commit a8d2b85

Please sign in to comment.