I'm using BS4 to scape an eCommerce site and I need to check the stock. Most of the products I can check the stock scraping the product json for:
stock = (jsonData['stocks']['XZ32_'])
because the json object is something like:
"stocks": {
"XZ32_": 81
}
But sometimes it changes and looks something like this:
"stocks": {
"XZ32_33935": 81
}
This number changes on every single product.
Question: Is there any way to get the value for a key in the json object that starts with "XZ32_" ?