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 26, 2018
1 parent 8248ace commit 9f70822
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions scraper.py
Expand Up @@ -35,13 +35,14 @@

root = lxml.html.fromstring(html)
ages = root.cssselect("tr")
for age in ages:
div = tr.text_content().encode('ascii','ignore')
if "years" in div:
print name.text.encode('ascii', 'ignore')
print name.attrib['href']
record['ages'] = name.text.encode('ascii', 'ignore')
print record
print ages
#for age in ages:
#div = tr.text_content().encode('ascii','ignore')
#if "years" in div:
#print name.text.encode('ascii', 'ignore')
#print name.attrib['href']
#record['ages'] = name.text.encode('ascii', 'ignore')
#print record



Expand Down

0 comments on commit 9f70822

Please sign in to comment.