Skip to content

Commit

Permalink
Update scraper.py
Browse files Browse the repository at this point in the history
  • Loading branch information
GianlucaGL committed Jan 27, 2018
1 parent 69c6b4b commit 6c05612
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scraper.py
Expand Up @@ -13,7 +13,9 @@
root = lxml.html.fromstring(html)
sections = root.cssselect("tr")
for section in sections:
print "This section is: {}".format(section.text_content().encode('ascii', 'ignore'))
divs = section.cssselect("td div")
for div in divs:
print "This div is: {}".format(div.text_content().encode('ascii', 'ignore'))
# names = root.cssselect("td div a")
# if section = root.cssselect("td div a")
# print section.text.encode('ascii', 'ignore')
Expand Down

0 comments on commit 6c05612

Please sign in to comment.