我在用python构建一个web刮板。
我的scraper的目的是从这个网页获取所有指向网站的链接http://www.ebizmba.com/articles/torrent-websites
我想要的输出是-
www.thepiratebay.se
www.kat.ph
我是python和scraping的新手,我这么做只是为了练习。请帮助我得到正确的输出。在
我的代码---------------------------------
^{pr2}$
我的输出---http://i.stack.imgur.com/Xi37B.png
Tags:
像这样使用^{} :
全输出:
^{pr2}$如果你在网上练习,看看正则表达式。 这里只会得到标题链接。。。针串是匹配字符串,括号
(http://.*?)
包含匹配组。在相关问题 更多 >
编程相关推荐