title: Whats the best way to scrape data from Zillow?
body: <p>I have been unsuccessful in trying to gather data from Zillow. </p>
  
  <p>Example:</p>
  
  <p><code>url = https://www.zillow.com/homes/for_sale/Los-Angeles-CA_rb/?fromHomePage=true&amp;shouldFireSellPageImplicitClaimGA=false&amp;fromHomePageTab=buy</code> </p>
  
  <p>I want to pull information like addresses, prices, zestimates, locations from all homes in LA.</p>
  
  <p>I have tried HTML scraping using packages like BeautifulSoup. I also have tried using the json. I'm almost positive that Zillow's API will not be helpful. It's my understanding that the API is best for gathering information on a specific property.</p>
  
  <p>I have been able to scrape information from other sites but it seems that Zillow uses dynamic ids (change every refresh) making it more difficult to access that information.</p>
  
  <p><strong>UPDATE:</strong>
  Tried using the below code but am still not producing any results</p>
  
  <pre><code>import requests
  from bs4 import BeautifulSoup
  
  url = 'https://www.zillow.com/homes/for_sale/Los-Angeles-CA_rb/?fromHomePage=true&amp;shouldFireSellPageImplicitClaimGA=false&amp;fromHomePageTab=buy'
  
  page = requests.get(url)
  data = page.content
  
  soup = BeautifulSoup(data, 'html.parser')
  
  for li in soup.find_all('div', {'class': 'zsg-photo-card-caption'}):
      try:
          #There is sponsored links in the list. You might need to take care 
          #of that
          #Better check for null values which we are not doing in here
          print(li.find('span', {'class': 'zsg-photo-card-price'}).text)
          print(li.find('span', {'class': 'zsg-photo-card-info'}).text)
          print(li.find('span', {'class': 'zsg-photo-card-address'}).text)
          print(li.find('span', {'class': 'zsg-photo-card-broker-name'}).text)
      except :
          print('An error occured')
  </code></pre>