Skip to content

Commit

Permalink
Update scraper.py
Browse files Browse the repository at this point in the history
  • Loading branch information
LauraJourno committed Feb 19, 2019
1 parent 2c1b391 commit d57ac07
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scraper.py
Expand Up @@ -21,9 +21,9 @@
#CSSSELECT IS A FUNCTION TO DRILL DOWN IN TO THE CODE ON THE PAGE. THIS LINE OF CODE IS ASKING IT TO MAKE A MATCH TO ANY HTML TAGS WITHIN THE STRING THAT MATCH THAT CRITERIA.
#SO "DIVALIGN-'LEFT'... DIV AND ALIGN LEFT ARE HTML TAGS, ALIGN LEFT IS AN ATTRIBUTE, SO WE'RE ASKING IT TO GRAB ANYTHING THAT MATCHES THESE.
#WE RAN THIS ON MORPH.IO AND IT CAME BACK WITH EMPTY [ ]. THIS MEANS IT RETURNED NO MATCHES FOR DIVALIGN LEFT.
list of matches=root.cssselect("a")
listofmatches=root.cssselect("a")
#THIS CODE TURNS THE HTML WE'VE SCRAPED INTO SOMETHING THAT MAKES SENSE.
for match in list of matches:
for match in listofmatches:
print(match)
# # 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 d57ac07

Please sign in to comment.