Python mechanize to follow image links?

Posted by Shark on Stack Overflow See other posts from Stack Overflow or by Shark
Published on 2010-03-29T16:17:54Z Indexed on 2010/03/30 6:23 UTC
Read the original article Hit count: 493

Filed under:
|
|
|

mechanize's Browser class is great and it's follow_link() function is great too. But what to do with this kind of links:

<a href="http://example.com"><img src="…"></a>

Is there any way to follow such links? The text attribute of this type of links is simply '[IMG]', so AFAIK, there is no way to differentiate such links. Any help would be appreciated.

© Stack Overflow or respective owner

Related posts about python

Related posts about mechanize