'Read data from reviews on the Daraz website

This code perfectly runs in other URL like getting a product or paragraph. But cannot able to read reviews.

import csv
from lib2to3.pgen2 import driver
from operator import itemgetter
from re import template
from bs4 import BeautifulSoup

from selenium import webdriver

driver = webdriver.Chrome('H:/PythonMechineLearnning/WebScrape/chromedriver_win32/chromedriver.exe') 

url = 'https://www.daraz.com.bd/products/1-livingtex-_-i183964360-s1169754856.html?spm=a2a0e.searchlist.list.2.6a801fbaMbkK8g&search=1'
driver.get(url)
print(url)

soup = BeautifulSoup(driver.page_source, 'html.parser')
result = soup.find_all('div', {'class': 'content'})

print(result[0])

Error IndexError: list index out of range cannot able to read data

enter image description here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source