from bs4 import BeautifulSoup import pandas as pd import requests import csv headers = {"User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:66.0) Gecko/20100101 Firefox/66.0", "Accept-Encoding":"gzip, deflate", "Accept":"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "DNT":"1","Connection":"close", "Upgrade-Insecure-Requests":"1"} url= "https://www.amazon.in/dp/B0BGZN7FWV" page = requests.get(url, headers = headers) content =page.content soup=BeautifulSoup(content)
PartnerofferNo=soup.find('a', attrs={"class":"a-size-base a-link-emphasis vsx-offers-count"}) print(PartnerofferNo)
a
content
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)