1

I'm trying to get the Zillow ID using the following code:

from pyzillow.pyzillow import ZillowWrapper, GetDeepSearchResults,GetUpdatedPropertyDetails
address = '1600 Pennsylvania Ave NW, Washington, DC'
zipcode = '20006'
zillow_data = ZillowWrapper('API Key')
deep_search_response = zillow_data.get_deep_search_results(address,zipcode)
result = GetDeepSearchResults(deep_search_response)
print(result.zillow_id) 

Any thoughts on why the above isn't working? Here is the error:

ZillowFail                                Traceback (most recent call last)
<ipython-input-12-7f34d0e7b6f0> in <module>()
      3 zipcode = '60053'
      4 zillow_data = ZillowWrapper('API Key')
----> 5 deep_search_response = zillow_data.get_deep_search_results(address,zipcode)
      6 result = GetDeepSearchResults(deep_search_response)
      7 print(result.zillow_id)

/home/mfranzidis/pyenvs/numeric/lib/python2.7/site-packages/pyzillow/pyzillow.pyc in get_deep_search_results(self, address, zipcode)
     29             'zws-id': self.api_key
     30         }
---> 31         return self.get_data(url, params)
     32 
     33     def get_updated_property_details(self, zpid):

/home/mfranzidis/pyenvs/numeric/lib/python2.7/site-packages/pyzillow/pyzillow.pyc in get_data(self, url, params)
     62             requests.exceptions.TooManyRedirects,
     63                 requests.exceptions.Timeout):
---> 64             raise ZillowFail
     65 
     66         try:

ZillowFail: 
Azat Ibrakov
  • 9,998
  • 9
  • 38
  • 50
Mike
  • 1,049
  • 5
  • 20
  • 46

1 Answers1

1

This looks like an issue with the Zillow API. As you can see it's failing with a requests too many redirects exception, so probably something ends up in a redirect loop on their API side:

/home/mfranzidis/pyenvs/numeric/lib/python2.7/site-packages/pyzillow/pyzillow.pyc in get_data(self, url, params)
     62             requests.exceptions.TooManyRedirects,

This is not handled very well by their library which seems to throw a ZillowFail exception with an empty message in this case.

Uku Loskit
  • 40,868
  • 9
  • 92
  • 93
  • thanks for the response. What does too many redirects mean, and do you know how I would go about resolving it? Thanks – Mike Nov 13 '18 at 13:43
  • since it appears to be an unofficial library which was last updated in 2015, I'd suggest trying out an more up to date implementation such as https://github.com/seme0021/python-zillow – Uku Loskit Nov 13 '18 at 13:56