python - Why is my parser not working -
i'm trying scrape directory info website. 'http://www.virginiaequestrian.com/main.cfm?action=greenpages&sub=view&id=10478'
but don't know how select different lines of text because tags line break elements(
). there way can search text rather tag?
r=requests.get('http://www.virginiaequestrian.com/main.cfm?action=greenpages&sub=view&id=10478') soup=beautifulsoup(r.content,'lxml') tbl=soup.findall('table')[2] print tbl.br
the text looking in 2nd tr inside table. so,
print tbl.findall('tr')[2]
there isn't structure inside text, however, you're on own getting contact name, etc.
Comments
Post a Comment