运行无反应,也不报错,啥毛病??
import xlwt
import requests
from lxml import etree
import time
all_info_list=[]
def get_info(url):
html=requests.get(url)
selector=etree.HTML(html.text)
infos=selector.xpath('//ul[@class="all_img_list cf"]/li')
for info in infos:
title=info.xpath('div[2]/h4/a/text()')[0]
author=info.xpath('div[2]/p[1]/a[1]/text()')[0]
style_1=info.xpath('div[2]/p[1]/a[2]/text()')[0]
style_2=info.xpath('div[2]/p[1]/a[3]/text()')[0]
style=style_1+'.'+style_2
complete=info.xpath('div[2]/p[1]/span[1]/text()')
introduce=info.xpath('div[2]/p[2]')[0].strip()
word=info.xpath('div[2]/p[3]/span/span[1]/text()')[0].strip('万字')
info_list=['title','author','style','complete','imtroduce'