title: Why is my CSS selector not working with beautifulsoup but works fine as a chrome console query?
body: <p>I have a css selector that works fine when executing it in the chrome JS Console, but does not work when running it through beautifulsoup on one example, yet works on another (I'm unable to discern the difference between the two). </p>
  
  <pre><code>url_1 = 'https://www.amazon.com/s?k=bacopa&amp;page=1'
  url_2 = 'https://www.amazon.com/s?k=acorus+calamus&amp;page=1'
  </code></pre>
  
  <p>The following query works fine on both when executing it in the chrome console. </p>
  
  <pre><code>document.querySelectorAll('div.s-result-item') 
  </code></pre>
  
  <p>Then running the two urls through beautifulsoup, this is the output I get.</p>
  
  <p><strong>url_1 (works)</strong></p>
  
  <pre><code>headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36'}
  r = requests.get(url_1, headers=headers)
  soup = BeautifulSoup(r.content, 'html.parser')
  listings = soup .select('div.s-result-item')
  print(len(listings))
  </code></pre>
  
  <p>output: 53 (correct)</p>
  
  <p><strong>url_2 (does not work)</strong></p>
  
  <pre><code>headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36'}
  r = requests.get(url_2, headers=headers)
  soup = BeautifulSoup(r.content, 'html.parser')
  listings = soup.select('div.s-result-item')
  print(len(listings))
  </code></pre>
  
  <p>output: 0 (incorrect - expected: 49)</p>
  
  <p>Does anyone know what might be going on here and how I can get the css selector to work with beautifulsoup?</p>