I cannot able to webscrape rating percentage from amazon product page. I am getting only null values. Here is my code
from typing import Text
from bs4 import BeautifulSoup
import requests
import pandas as pd
from datetime import date
import os
url='https://www.amazon.in/dp/B09BJQCTMX?ref=myi_title_dp'
req = requests.get(url)
content=BeautifulSoup(req.content,"lxml")
data = content.findAll('a',class_='a-link-normal')
print(data)
I have provided correct class name but only null values in retrieved.
Try to put
headersinside request call and data will be present insidecontentNow use appropriate
classto find dataImage: