import requests
from lxml.html import etree
import time
for i in range(1,6):
print('http://shop.kongfz.com/34186/new/0_50_0_0_{}_sort_desc_0_0/'.format(i))
url='http://shop.kongfz.com/34186/new/0_50_0_0_{}_sort_desc_0_0/'.format(i)
res = requests.Session().get(url, headers={'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36'})
#print(res.text)
html = etree.HTML(res.text)
div_books = html.cssselect('a.row-name')
print("hello")
print(len(div_books))
#print(div_books)
i=0
for book in div_books:
print(html.cssselect('a.row-name')[i].text)
print(html.cssselect('div.row-author')[i].text)
print(html.cssselect('div.row-quality')[i].text)
print()
i=i+1
print(i)
time.sleep(3)
import requestsfrom lxml.html import etreeimport timefor i in range(1,6): print('http://shop.kongfz.com/34186/new/0_50_0_0_{}_sort_desc_0_0/'.format(i)) url='http://shop.kongfz.com/34186/new/0_50_0_0_{}_sort_desc_0_0/'.format(i) res = requ.