May-27-2022, 12:31 PM
By using Request and BS you get 200 back,but you have to look content.
There you see that get detected a denned access.
There you see that get detected a denned access.
import requests from bs4 import BeautifulSoup user_agent = {'User-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.0.0 Safari/537.36'} url = 'https://www.amazon.com/Advanced-Artificial-Intelligence-Robo-Justice-Georgios-ebook/dp/B0B1H2MZKX/ref=sr_1_1?keywords=9783030982058&qid=1653563461&sr=8-1' response = requests.get(url, headers=user_agent) soup = BeautifulSoup(response.content, 'lxml') title = soup.select_one('#productTitle') print(response.status_code) print(title) print('-' * 20) print(soup.find('body'))
Output:200
None
--------------------
<body>
<!--
To discuss automated access to Amazon data please contact [email protected].
For information about migrating to our APIs refer to our Marketplace APIs at https://developer.amazonservices.com/ref=rm_c_sv, or our Product Advertising API at https://affiliate-program.amazon.com/gp/advertising/api/detail/main.html/ref=rm_c_ac for advertising use cases.
-->
<!--
Correios.DoNotSend
-->
.....