Skip to content

Commit

Permalink
Update scraper.py
Browse files Browse the repository at this point in the history
  • Loading branch information
CharlotteMaher committed Jul 17, 2019
1 parent 65a854d commit 423c00b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions scraper.py
Expand Up @@ -19,18 +19,18 @@
#Find info on index
info = root.cssselect('dt')
for companyinfo in info:
print companyinfo.text
#print companyinfo.text
#write out in ordered table
record = { "companyinfo" : companyinfo.text } # column name and value
scraperwiki.sqlite.save(["companyinfo"], record) # save the records one by one

#
#Find another thing on the page using css selectors
address = root.cssselect('dd')
for companyaddress in address:
print companyaddress.text

#write out in ordered table
record = { "companyinfo" : companyinfo.text } # column name and value
scraperwiki.sqlite.save(["companyinfo"], record) # save the records one by one

#
# # Write out to the sqlite database using scraperwiki library
#scraperwiki.sqlite.save(unique_keys=['name'], data={"name": "susan", "occupation": "software developer"})
#
Expand Down

0 comments on commit 423c00b

Please sign in to comment.