无策略的爬虫
#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)]
#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)]