首页 > 解决方案 > lxml html ubnable to parse display block

问题描述

I'm trying to scrape this website - of dutyfree product and get a list of choclate products, but actually i'm only getting nothing..

from lxml import html
import lxml.html
import requests
import lxml

tree = html.fromstring(url.content)
    data_price = tree.xpath('//div[@class="main"]/div[1]/div[1]/div[1]')
    for item in data_price:
        print(lxml.html.tostring(item))

here is the F12 description

标签: pythonparsinglxml

解决方案


推荐阅读