コード例 #1
0
ファイル: response_queue.py プロジェクト: FFng/yascrapy
    def __init__(self):
        """Use response.text have performance problem, use response.html fix it.
        This is an issue, maybe some init charset not set, requests use chardet
        library to detect charset of the html content.

        """
        ResponseLib.__init__(self)
コード例 #2
0
ファイル: response_queue.py プロジェクト: hongbowang/yascrapy
    def __init__(self):
        """Use response.text have performance problem, use response.html fix it.
        This is an issue, maybe some init charset not set, requests use chardet
        library to detect charset of the html content.

        """
        ResponseLib.__init__(self)
コード例 #3
0
 def __init__(self, result, status_code=200):
     Response.__init__(self)
     self.result = result
     self.status_code = status_code
コード例 #4
0
 def __init__(self, json_data, status_code):
     Response.__init__(self)
     self.json_data = json_data
     self.status_code = status_code
コード例 #5
0
 def __init__(self, result, status_code=200, **kwargs):
     Response.__init__(self)
     self.result = result
     self.status_code = status_code
     self.raw = kwargs.get("raw")
コード例 #6
0
 def __init__(self, json_data):
     Response.__init__(self)
     self.json_data = json_data
     self.status_code = json_data["status_code"]
     self.reason = json_data["reason"]
     self.url = json_data["url"]