-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
Hi Alex,
My Name is Praveen Kumar, I was following your data Analyst Boot Camp. I was at closer to complete the course. but i'm at Amazon Webscraping Module I was getting error to get Price from Amazon. Iwas sharing the screen short of this. Even I tried the code you uploaded in github and i'm getting same error .Please Help to resolve
`
from bs4 import BeautifulSoup
import requests
import time
import datetime
import smtplib
headers = {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36", "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"}
page = requests.get(URL, headers=headers)
soup1 = BeautifulSoup(page.content, "html.parser")
soup2 = BeautifulSoup(soup1.prettify(), "html.parser")
title = soup2.find(id='productTitle').get_text()
print(title)
price = soup2.find(id='priceblock_ourprice').get_text()
print(price)
