Skip to content

Commit

Permalink
added extra if statement to grab more data
Browse files Browse the repository at this point in the history
  • Loading branch information
paulbradshaw committed Jan 16, 2017
1 parent ea02b31 commit 75c7a64
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions scraper.py
Expand Up @@ -20,6 +20,11 @@
record = {}
for line in lines:
#if the object is less than 4 characters long
if len(line.text)>4:
record["date"] = line.text
scraperwiki.sqlite.save(['date'], record)
if len(line.text)<5:
code = line.text
print record
if len(line.text)4:
record["location"] = line.text
record["code"] = code
print record
scraperwiki.sqlite.save(['code'], record)

0 comments on commit 75c7a64

Please sign in to comment.