🕷️ The BEST Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ and follow here for daily tips and tricks: https://x.com/Scrapling_dev
Python aiai-scrapingautomationcrawlercrawlingcrawling-pythondatadata-extractionmcpmcp-serverplaywrightpythonscrapingselectorsstealthweb-scraperweb-scrapingweb-scraping-pythonwebscrapingxpath
Give response's body bytes priority over response's text
Karim shoair1ff1c93bcf2d
diff --git a/scrapling/engines/toolbelt/custom.py b/scrapling/engines/toolbelt/custom.pyindex 990244e..3d71b4f 100644--- a/scrapling/engines/toolbelt/custom.py+++ b/scrapling/engines/toolbelt/custom.py@@ -24,10 +24,10 @@ class Response:@propertydef 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 Nonedef __repr__(self):