Closed igorsimb closed 9 months ago
It turns out you need to specify the region in the request in order to get the item availability information, e.g. dest=-455203
(I think it's Moscow).
The url would like this this: https://card.wb.ru/cards/detail?appType=1&curr=rub&dest=-455203&nm={sku}
Currently
sizes -> stocks
always returns an empty list, even though visually (Instepct -> Network tab in Chrome) it's not empty, e.g.It looks like JavaScript is used to load the
stocks
dynamically, and it may be impossible to do it without Selenium. Some theories used:data.products[0].panelPromoId
field (if exists - items IN stock, if does not - item not in stock): FAILEDUser-Agent
) in http request: FAILEDMaybe the only way to check for availability is via
scrape_live_price(sku)
function.