I want to scrape the product title , product link , product price but when I am using the xpath it is showing the null list . How to add the xpath and for loop to get the above details . I have tried this
import requests
import lxml.htmlhtml = requests.get("https://www.lazada.sg/catalog/? q=Samsung+Mobile&_keyori=ss&from=input&spm=a2o42.home.search.go.654346b52P3y8Y")
doc = lxml.html.fromstring(html.content)
#print(doc)new = doc.xpath('//div[@class ="index__box___1Ffv-"]')
print(len(new))
for node in new:title = node.xpath('//* [@id="root"]/div/div[2]/div[1]/div/div[1]/div[2]/div[1]/div/div/div[2]/div[2]/text()')print(len(title))print(title)
I need to get all the product details as mention above. I want this by using only lxml library.