标签:
import requests from lxml import etree
url = "http://avdb.la/actor/" headers = {"User-Agent":‘Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.152 Safari/537.36‘} html = requests.get(url,headers = headers) content = html.text #content = content.encode("utf8") selector = etree.HTML(content) name = selector.xpath(‘//*[@id="waterfall"]/div/a/@title‘)
标签:
原文地址:http://www.cnblogs.com/premier/p/4655920.html