无策略的爬虫
时间:2015-10-29 12:51:23
收藏:0
阅读:209
#2015.10.29
s=‘‘‘http://baidu.com http://qq.com‘‘‘#抓取地址
head="http:"
tail=".com"
posh=0
post=0
for i in range(0,s.count(head)):
posh=s.find(head,post)
post=s.find(tail,posh)
print posh,post,s[posh:post+len(tail)]
原文:http://www.cnblogs.com/qiangge666/p/4919773.html
评论(0)