api.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:python-zillow 作者: seme0021 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号