|
from lxml import etree
import requests
import fake_useragent
from fake_useragent import UserAgent
url='https://www.aladdin-e.com/zh_cn/chemicals-and-biochemicals/bioscience/biological-buffers.html'
headers=UserAgent().random
resp=requests.get(url,headers)
tree=etree.HTML(resp.text)
ul_list=tree.xpath('//div[@class="products wrapper grid products-grid product-cate-grid"]//ol')
product_list=[]
for ul in ul_list:
product_list+=ul.xpath('.//a/text()')
print(product_list)
|
|