You wrote:
> i have an
> href which looks like this:
> <td class="all">
>     <a class="btn" name="D1" href="http://www.cnn.com";>
>         </a>
> here is my code
> 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
Since you already found the anchor tag with the 'btn' class attribute,
just grab it's href attribute like so:
for incident in row('td', {'class':'all'}):
       n = incident.findNextSibling('a', {'class': 'btn'})
       link = n['href'] + "','"

Works for me...

LL

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to