37,743
社区成员




<a href="http://news.baidu.com/ns?cl=2&rn=20&tn=news&" onmousedown="return ForHeader.setWord(this,\'word\');">
http://news.baidu.com/ns?cl=2&rn=20&tn=news&
href=\"(.+?)\"
href="http://news.baidu.com/ns?cl=2&rn=20&tn=news&" onmousedown="return ForHeader.setWord(this,\'word\');"
def findLinks(htmlString):
"""
搜索htmlString中所有的有效链接地址,方便下次继续使用
"""
linkPattern = re.compile("href=\"(.+?)\"")
return linkPattern.findall(htmlString)