Skip to content

Commit

Permalink
Use cell value, utf-8 encode
Browse files Browse the repository at this point in the history
  • Loading branch information
mnagy committed Jul 12, 2014
1 parent cd0c9a2 commit 639cf15
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scraper.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
for row in range(1, sheet.nrows): for row in range(1, sheet.nrows):
#writer.writerow([sheet.cell(row, i).value.encode('utf8') for i in cell_idxs]) #writer.writerow([sheet.cell(row, i).value.encode('utf8') for i in cell_idxs])
data = { data = {
'obec': sheet.cell(row, 1), 'obec': sheet.cell(row, 1).value.encode('utf8'),
'okres': sheet.cell(row, 2), 'okres': sheet.cell(row, 2).value.encode('utf8'),
'psc': sheet.cell(row, 3), 'psc': sheet.cell(row, 3).value.encode('utf8'),
'kraj': sheet.cell(row, 7), 'kraj': sheet.cell(row, 7).value.encode('utf8'),
} }
scraperwiki.sqlite.save(unique_keys=['obec'], data=data) scraperwiki.sqlite.save(unique_keys=['obec'], data=data)

0 comments on commit 639cf15

Please sign in to comment.