I am using lxml and python to scrape through a page. The link to the page is HERE. The hiccup I face right now is how to fetch the attribute in the tag. For example the 3 Gold stars at the top of the page, they have a html
<abbr title="3" class="average rating large star3">★★★☆☆</abbr>
Here I want to fetch the title so that I know how many stars did this location get.
I have tried doing a couple of things including this:
response = urllib.urlopen('http://www.insiderpages.com/b/3721895833/central-kia-of-irving-irving').read()
mo = re.search(r'<div class="rating_box">.*?</div>', response)
div = html.fromstring(mo.group(0))
title = div.find("abbr").attrib["title"]
print title
But does not work for me. Help would be appreciated.