Give response's body bytes priority over response's text

This commit is contained in:
Karim shoair
2024-11-03 13:04:02 +02:00
parent afe53332b8
commit 1ff1c93bcf
+3 -3
View File
@@ -24,10 +24,10 @@ class Response:
@property
def adaptor(self):
if self.text:
return Adaptor(text=self.text, url=self.url, encoding=self.encoding, **self.adaptor_arguments)
elif self.content:
if self.content:
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
def __repr__(self):