Skip to content

Commit

Permalink
Update scraper.py
Browse files Browse the repository at this point in the history
  • Loading branch information
g0rd committed Sep 21, 2014
1 parent 7e140d6 commit 83b22ef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def scrape(schoolcode):
print ell_budget[0].text_content().encode("utf-8").strip()
school = school_name[0].text_content().encode("utf-8").strip()
budget = ell_budget[0].text_content().encode("utf-8").strip()
output = {'school_id': schoolcode, 'school_name':school, 'budget': budget }
output = {"school_id": schoolcode, "school_name":school, "budget": budget }

# sometimes there's a header, sometimes not
# if re.search('Data Source GALAXY|Allocation CategoryFY[\s\xa0]*\d\d\d\d', budget_rows[0].text_content()):
Expand Down Expand Up @@ -106,7 +106,7 @@ def scrape(schoolcode):
#ldata.append(output)

#pprint(ldata)
scraperwiki.sqlite.save(unique_keys=['school_id'], data=output, table_name=TABLE)
scraperwiki.sqlite.save(unique_keys=["school_id"], data=output, table_name=TABLE)


def get_school_ids():
Expand Down

0 comments on commit 83b22ef

Please sign in to comment.