Skip to content

Commit

Permalink
Update scraper.py
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexandruBratu committed Feb 26, 2019
1 parent 5d6fd7f commit ddf1c77
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions scraper.py
@@ -1,4 +1,3 @@

# This is a template for a Python scraper on morph.io (https://morph.io)
# including some code snippets below that you should find helpful

Expand All @@ -13,11 +12,13 @@
root.cssselect("li p a")
#
matchedlinks=root.cssselect("li p a")
print(matchedlinks)
#
# print(matchedlinks)
record={}
for li in matchedlinks:
listtext=li.text_content()
print(listtext)
record['address'] = listtext
scraperwiki.sqlite.save(['address'],record)
# # 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 ddf1c77

Please sign in to comment.