I have the following source code of a web page web that I am trying to parse data from
<span class="reviewCount">
<a href="...Reviews-WHATIWANT-City..." target="_blank" onclick="XX;">1,361 reviews</a>
</span>
EDIT (with beautiful soup):
To extract this information I parse the data using beautiful soup. I use the following code:
spans = soup.findAll('span', attrs={"class":u"reviewCount"})
for span in spans:
a = span.find('a')
print re.search('(?<=Reviews-)(.*?)(?=-City)', a.get('href'))
but I get this information
<_sre.SRE_Match object at 0x7f84fce05300>
<_sre.SRE_Match object at 0x7f84fce05300>
<_sre.SRE_Match object at 0x7f84fce05300>
<_sre.SRE_Match object at 0x7f84fce05300>
and not the bytes between "Reviews-" and "-City". Could anyone assist me in finding the right syntax? Thanks.