def _RequestUrl(self, url, verb, data=None):
"""
Request a url.
:param url: The web location we want to retrieve.
:param verb: GET only (for now).
:param data: A dict of (str, unicode) key/value pairs.
:return:A JSON object.
"""
if verb == 'GET':
url = self._BuildUrl(url, extra_params=data)
try:
return requests.get(
url,
auth=self.__auth,
timeout=self._timeout
)
except requests.RequestException as e:
raise ZillowError(str(e))
return 0
评论列表
文章目录