python通过正则获取网页上的全部链接

2015-04-29 0 861
python通过正则获取网页上的全部链接
import re, urllib
htmlSource = urllib.urlopen("http://www.sharejs.com").read(200000)
linksList = re.findall('<a href=(.*?)>.*?</a>',htmlSource)
for link in linksList:
    print link

遇见资源网 python python通过正则获取网页上的全部链接 http://www.ox520.com/15280.html

下一篇: Argparse
常见问题

相关文章

发表评论
暂无评论
官方客服团队

为您解决烦忧 - 24小时在线 专业服务