title: Beautiful soup returns empty list on one website, but works on another website
body: <p>I'm currently learning Python through "Automate the boring stuff with Python".
  I'm doing the Web Scraping part at the moment.</p>
  
  <p>I wrote code that gets that price of a product from one website. However, when I edit my code a little to work on another website is does not seem to work, and Beautiful Soup returns an empty list from the CSS.</p>
  
  <p>This is my working code.</p>
  
  <pre><code>import bs4, requests, re
  
  def getPrice(productUrl):
      res = requests.get(productUrl)
      res.raise_for_status()
  
      soup = bs4.BeautifulSoup(res.text, 'html.parser')
  
      # Go through CSS and get price
      source = soup.select('#product_addtocart_form &gt; div.product-shop &gt; div.details-info')
      element = source[0].text.strip()
      # Regex for getting the price from the rest of the CSS.
      pattern = re.compile(r"""R([1-9]\d*)(\.\d\d)?(?![\d.])""")
  
      # Get price from string using regex pattern
      trueprice = re.split(pattern, element)
      return("The product's price is : R " + trueprice[1])
  
  product = "https://www.faithful-to-nature.co.za/green-home-paper-straws-in-compostable-bag"
  
  weblink = getPrice(product)
  
  print(weblink)
  </code></pre>
  
  <p>This is my edited code for another website that does not work.
  I commented some code out because it serves no function while there is no data in the list.</p>
  
  <pre><code>import bs4, requests, re
  
  def getPrice(productUrl):
      res = requests.get(productUrl)
      res.raise_for_status() # Check for any errors in request
  
      soup = bs4.BeautifulSoup(res.text, 'html.parser')
  
      # Go through CSS and get price
      csssource = soup.select('#shopfront-app &gt; div &gt; div.grid-container.pdp-grid-container &gt; div.grid-x.grid-margin-x &gt; div &gt; div &gt; div &gt; div &gt; div.cell.medium-auto &gt; div.pdp-core-module_actions_mdYzm &gt; div.sf-buybox.pdp-core-module_buybox_q5wLs.buybox-module_buybox_eWK2S')
      #element = csssource[0].text.strip()
  
      # Regex for getting the price from the rest of the CSS.
      pattern = re.compile(r"""R([1-9]\d*)(\.\d\d)?(?![\d.])""")
  
      #trueprice = re.split(pattern, element)
      #return("The product's price is : R " + trueprice[1])
  
      print(csssource)
  
  test1 = "https://www.takealot.com/lego-classic-basic-brick-set-11002/PLID53430493"
  
  
  weblink = getPrice(test1)
  
  print(weblink)
  </code></pre>
  
  <p>With both sites I got the CSS-selector using the inspect method on Chrome. I tried using wider CSS-selectors but Beautiful Soup still returns an empty list.</p>
  
  <p>How do I get Beautiful Soup to return the correct list / CSS-selector?</p>