how to scrape url out of href

homepricemaps at gmail.com homepricemaps at gmail.com
Sun Jan 1 23:02:16 EST 2006


mike's code worked like a charm.  i have one more question.  i have an
href which looks like this:

<td class="all">
    <a class="btn" name="D1" href="http://www.cnn.com">
        </a>

i thought i would use this code to get the href out but it fails, gives
me a keyerror:

for incident in row('td', {'class':'all'}):
		n = incident.findNextSibling('a', {'class': 'btn'})
		link = incident.findNextSibling['href'] + "','"


any idea what i'm doing wrong here with the syntax?  thanks in advance




More information about the Python-list mailing list