Skip to content

Commit a504fd9

Browse files
committed
starting on api
1 parent 4923d80 commit a504fd9

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

requirements.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
appdirs==1.4.3
2+
packaging==16.8
3+
pyparsing==2.2.0
4+
requests==2.13.0
5+
six==1.10.0
6+
xmltodict==0.10.2

zillow.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import requests
2+
import xmltodict
3+
import os
4+
5+
6+
class Zillow(object):
7+
"""A python wrapper for the Zillow Home API"""
8+
def __init__(self, arg):
9+
self.ZWSID = os.environ['ZWSID']
10+
self.base = "https://www.zillow.com/webservice/"
11+
12+
def GetSearchResults(self, address, citystatezip):
13+
14+
15+
16+
17+
data = {'zws-id' : ZWSID,'address' : "3276 Spyglass Drive",'citystatezip':"98226"}
18+
19+
response = requests.get(base + "GetSearchResults.htm",params=data)
20+
21+
house = xmltodict.parse(response.text)

0 commit comments

Comments
 (0)