Giter Site home page Giter Site logo

Comments (6)

SioKCronin avatar SioKCronin commented on July 26, 2024

I got a similar response when running the example:

Traceback (most recent call last):
  File "/Users/siobhancronin/.venv/py37/lib/python3.7/site-packages/zillow/api.py", line 130, in GetDeepSearchResults
    place.set_data(xmltodict_data.get('SearchResults:searchresults', None)['response']['results']['result'])
  File "/Users/siobhancronin/.venv/py37/lib/python3.7/site-packages/zillow/place.py", line 197, in set_data
    self.zpid = source_data.get('zpid', None)
AttributeError: 'list' object has no attribute 'get'

During handling of the above exception, another exception occurred:

source_data is assumed to be type dict but is type list

from python-zillow.

YutingLu900607 avatar YutingLu900607 commented on July 26, 2024

how to solve this problem? source_data is assumed to be type dict but is type list

from python-zillow.

DShep68 avatar DShep68 commented on July 26, 2024

someone please message back how to fix this error i'm relatively new to python as well. please give a well detailed response

from python-zillow.

stubs avatar stubs commented on July 26, 2024

I have a PR open to help to address this #37.

It seems that GetSearchResults & GetDeepSearchResults will return either a single search result or a list of search results. When the latter occurs it leads to that assumption error of data types mentioned by @YutingLu900607 and @SioKCronin.

from python-zillow.

nitrocode avatar nitrocode commented on July 26, 2024

Here's something I noticed was swallowed by the above error message. I cloned your branch locally and stepped through it and I see this when I look at the XML. I'm using the example code in the README.md

Example code for reference and my key is stored in env var ZWSID

import zillow
import os

key = os.environ['ZWSID']
address = "3400 Pacific Ave., Marina Del Rey, CA"
postal_code = "90292"

api = zillow.ValuationApi()
data = api.GetSearchResults(key, address, postal_code)

Swallowed error:

>>> xmltodict_data['SearchResults:searchresults']['message']['text']
'Error: this account is not authorized to execute this API call'

I can replicate this using httpie / curl. Replace $ZWSID with your key or insert it in your env variable. Run the command and you'll see the same authorization failure message.

curl https://www.zillow.com/webservice/GetSearchResults.htm\?zws-id\=$ZWSID\&address\=3400+Pacific+Ave.%2C+Marina+Del+Rey%2C+CA\&citystatezip\=90292

Noticed that I only had a few things checked on this page.

https://www.zillow.com/webservice/EditAPIProfile.htm

  • Directory API
  • Mortgage API
  • Postings API
  • Profile Summary API
  • Property Details API
  • Reviews API
  • Valuation API

Once I check all of them and hit Submit, it returns a 500 error.

ERROR 500
Our Server is Unavailable Now
Our engineers are working on this issue, please check back in a few minutes. Sorry about the inconvenience!

Perhaps once Zillow fixes this page, I enable all the APIs, and then this python module should work 🙏 .

For now, I may switch to Redfin.

from python-zillow.

nitrocode avatar nitrocode commented on July 26, 2024

Contacted Zillow and they said they are in the process of shutting down the Zillow API and have moved to an invite only API to this third party.

See: https://bridgedataoutput.com/docs/platform/

from python-zillow.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.