Jan-18-2021, 11:42 AM
Hello,
Here is my code to explore this page:
Artificial Intelligence to Solve Pervasive Internet of Things Issues
![[Image: Screenshot-from-2021-01-18-12-34-10.png]](https://i.postimg.cc/P5rYK8ww/Screenshot-from-2021-01-18-12-34-10.png)
... and page is completely available, because return code is 200, which means Ok.
Any comments ?
Thanks
Here is my code to explore this page:
Artificial Intelligence to Solve Pervasive Internet of Things Issues
import requests from bs4 import BeautifulSoup headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:70.0) Gecko/20100101 Firefox/70.0', 'Accept': 'text/html,*/*', 'Accept-Language': 'bg,en-US;q=0.7,en;q=0.3', 'X-Requested-With': 'XMLHttpRequest', 'Connection': 'keep-alive'} isbn = 9780128185766 book_web_page = f'http://www.amazon.com/s?k={isbn}&ref=nb_sb_noss' response = requests.get(book_web_page, headers=headers) print("status code:\t", response.status_code) page = BeautifulSoup(response.text, 'html.parser') link_section = page.find('span', attrs={'id', 'productTitle'}) print("link_section type:\t", type(link_section))Here is output:
Output:status code: 200
link_section type: <class 'NoneType'>
And yet this section is indeed there:![[Image: Screenshot-from-2021-01-18-12-34-10.png]](https://i.postimg.cc/P5rYK8ww/Screenshot-from-2021-01-18-12-34-10.png)
... and page is completely available, because return code is 200, which means Ok.
Any comments ?
Thanks