title: Scraping AJAX e-commerce site using python
body: <p>I have a problem on <strong>scraping an e-commerce site</strong> using BeautifulSoup. I did some Googling but I still can't solve the problem. </p>
  
  <p>Please refer on the pictures:</p>
  
  <p><a href="https://i.stack.imgur.com/nlSun.png" rel="nofollow noreferrer">1</a> <strong>Chrome F12</strong> : <a href="https://i.stack.imgur.com/24deL.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/24deL.jpg" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/24deL.jpg" rel="nofollow noreferrer">2</a> <strong>Result</strong> : <a href="https://i.stack.imgur.com/2pGls.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2pGls.jpg" alt="enter image description here"></a></p>
  
  <p><strong>Here is the site that I tried to scrape</strong>: "<a href="https://shopee.com.my/search?keyword=h370m" rel="nofollow noreferrer">https://shopee.com.my/search?keyword=h370m</a>"</p>
  
  <p>Problem:</p>
  
  <ol>
  <li><p>When I tried to open up Inspect Element on Google Chrome (F12), I can see the  for the product's name, price, etc. But when I run my python program, I could not get the same code and tag in the python result. After some googling, I found out that <strong>this website used AJAX query to get the data</strong>.</p></li>
  <li><p>Anyone can help me on the best methods to get these product's data by <strong>scraping an AJAX site</strong>? I would like to <strong>display the data in a table form</strong>.</p></li>
  </ol>
  
  <p>My code:</p>
  
  <pre><code>import requests
  from bs4 import BeautifulSoup
  source = requests.get('https://shopee.com.my/search?keyword=h370m')
  soup = BeautifulSoup(source.text, 'html.parser')
  print(soup)
  </code></pre>