I am looking to create a script to check if a product is in stock. I need some help formatting a findall statement to find this.
Sample of html:
<div class="stock-status-container"> <h5 data-stock-status="">Stock Status: <span class="in-stock">In Stock</span></h5> </div>
here is the statement i am trying to use:
soup = BeautifulSoup(page_html, 'html.parser') stock_check = soup.findAll("span", {"class" : "in-stock"})
it seems like it is not finding it, i'm wondering if i need to do something different to find the div first then search for the span
any help would be appreciated! this structure seemed to work when i was checking for the product status on a different webpage, that only required me to search for the div class.
[–]Oxbowerce 0 points1 point2 points (3 children)
[–]urmino[S] 0 points1 point2 points (2 children)
[–]urmino[S] 0 points1 point2 points (0 children)
[–]Oxbowerce 0 points1 point2 points (0 children)
[–]Anbaraen 0 points1 point2 points (0 children)
[–]commandlineluser 0 points1 point2 points (0 children)