Permalink
Browse files

Use cell value, utf-8 encode

  • Loading branch information...
1 parent cd0c9a2 commit 639cf150414064cb3c7245338d38e270e870d6a3 @mnagy mnagy committed Jul 12, 2014
Showing with 4 additions and 4 deletions.
  1. +4 −4 scraper.py
View
@@ -19,9 +19,9 @@
for row in range(1, sheet.nrows):
#writer.writerow([sheet.cell(row, i).value.encode('utf8') for i in cell_idxs])
data = {
- 'obec': sheet.cell(row, 1),
- 'okres': sheet.cell(row, 2),
- 'psc': sheet.cell(row, 3),
- 'kraj': sheet.cell(row, 7),
+ 'obec': sheet.cell(row, 1).value.encode('utf8'),
+ 'okres': sheet.cell(row, 2).value.encode('utf8'),
+ 'psc': sheet.cell(row, 3).value.encode('utf8'),
+ 'kraj': sheet.cell(row, 7).value.encode('utf8'),
}
scraperwiki.sqlite.save(unique_keys=['obec'], data=data)

0 comments on commit 639cf15

Please sign in to comment.