I have tried LinkExtractor, TokenParser, Mechanize, TreeBuilder modules. For below html:
a href="http://www.yahoo.com" target=_blank><img src=http://us.i1.yimg.com/nw.gif height=11 width=11 border=0 alt="Open this result in new window"> </anchor>
all of them give "Open this result in new window" as the anchor text.
Ideally I would like to see blank value or a string like "image" returned so that I know there was no anchor text but the href still matched the target url(http://www.yahoo.com in this case). Is there a way to tweak those modules to get the desired result?