Notes/ML/SnapDealTracker-200910-134042.py

34 lines
519 B
Python
Raw Normal View History

2022-04-23 14:04:50 +00:00
import requests
from bs4 import BeautifulSoup
URL = "https://www.snapdeal.com/product/indus-valley-disposable-face-mask/638539148385"
headers = {
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.105 Safari/537.36 OPR/70.0.3728.106"
}
page = requests.get(URL, headers=headers)
soup = BeautifulSoup(page.content, 'html.parser')
print(page)
price3 = soup.find("span", {"class": "payBlkBig"})
print(price3)
print(price3.string)