标签:text break ext tor www next self html sts
url='http://www.baidu.com'
while True:
resp=requests.get(url).content.decode()
selector=etree.HTML(resp)
self.parse_data(selector)
next_url=''.join(selector.xpath("//div[@class='next']/text()"))
if next_url:
url=next_url
else:
break
标签:text break ext tor www next self html sts
原文地址:https://www.cnblogs.com/hankleo/p/12405611.html