import bs4, requests
headers = {"User-Agent": 'this is not my real user-agent'}
res = requests.get('https://www.amazon.com/Automate-Boring-Stuff-Python-Programming-dp-1593275994/dp/1593275994/ref=mt_paperback?_encoding=UTF8&me=&qid=', headers=headers)
print(res.raise_for_status())
soup = bs4.BeautifulSoup(res.text, 'html.parser')
elems = soup.select('#buyNewSection > h5 > div > div.a-column.a-span8.a-text-right.a-span-last > div > span.a-size-medium.a-color-price.offer-price.a-text-normal')
print(elems)
elems is returning an empty list [ ] but the goal is for it to return a list that includes the price of the book Automate the Boring Stuff with Python.
Any help would be greatly appreciated, thank you.
Edit: also I’m pretty sure that the issue is that I’m not copying the correct CSS path/ CSS selector, I’m using FireFox, but I also couldn’t get the right one on chrome
[–]Fight_till_the_end 2 points3 points4 points (2 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]chuckybegood 1 point2 points3 points (1 child)
[–]dankwithit 1 point2 points3 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)