headers = {'User-Agent': 'IDK IF THIS IS SMART TO SHARE SO I'M NOT SHARING IT:)} gourl = requests.get('https://www.jdsports.nl/product/wit-jordan-air-1-low-heren/132976_jdsportsnl/', headers=headers) page = bs4.BeautifulSoup(gourl.text, 'html.parser') page.select('#productSizeStock .btn-default:nth-child(1)')I want to click the button '#productSizeStock .btn-default:nth-child(1)'. But if it's not possible to click the button, I would like to receive a error.
But if I run this piece of code with a random text on the last line (page.select('...'), it doesn't give an error, even though the thing I'm asking requests to select, doesnt exist. Is this an error in my piece of code or is that just a characteristic of requests?
Thanks in advance! :)