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 26, 2019
1 parent 30c6447 commit 1980bf6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scraper.py
Expand Up @@ -12,12 +12,16 @@
# # Find something on the page using css selectors
root = lxml.html.fromstring(html)
root.cssselect("li p a")
#
#Change "div[align='left']" to a different CSS selector to grab something else.
#Looking on the site, I'm going to scrape through a series of tags to drill down information. I've asked it to find all a under p under li.
#In the inspector, this is seen like this:
#<li>
# <p>
# <a> This will essentially scrape all data that match this. Then if I wanted to look only at the Birmingham datasets, I would need to filter this further.
# <a>
#This will essentially scrape all data that match this pattern.
#Then if I wanted to look only at the Birmingham datasets, I would need to filter this further.
print(root)


# # Write out to the sqlite database using scraperwiki library
Expand Down

0 comments on commit 1980bf6

Please sign in to comment.