Give response's body bytes priority over response's text
This commit is contained in:
@@ -24,10 +24,10 @@ class Response:
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def adaptor(self):
|
def adaptor(self):
|
||||||
if self.text:
|
if self.content:
|
||||||
return Adaptor(text=self.text, url=self.url, encoding=self.encoding, **self.adaptor_arguments)
|
|
||||||
elif self.content:
|
|
||||||
return Adaptor(body=self.content, url=self.url, encoding=self.encoding, **self.adaptor_arguments)
|
return Adaptor(body=self.content, url=self.url, encoding=self.encoding, **self.adaptor_arguments)
|
||||||
|
elif self.text:
|
||||||
|
return Adaptor(text=self.text, url=self.url, encoding=self.encoding, **self.adaptor_arguments)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user