Skip to content

Commit

Permalink
Update scraper.py
Browse files Browse the repository at this point in the history
  • Loading branch information
LeifGreiss committed Dec 1, 2017
1 parent c1db772 commit eb9ae19
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions scraper.py
@@ -1,14 +1,9 @@
import scraperwiki
html = scraperwiki.scrape('http://inmo.ie/6022')
print "Click on the ...more link to see the whole page"

import lxml.html
root = lxml.html.fromstring(html) # turn our HTML into an lxml object
tds = root.cssselect('td') # get all the <td> tags
print tds
for td in tds:
print lxml.html.tostring(td) # the full HTML tag
print td.text # just the text inside the HTML tag
for td in tds:
record = { "td" : td.text } # column name and values
try:
Expand Down

0 comments on commit eb9ae19

Please sign in to comment.