Reputation: 1069
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:
Upvotes: 1
Views: 1133
Reputation: 42040
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.
Upvotes: 1