Skip to content

🕷️ 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

Convert the request headers to dictionary to unify response object shape across engines

Karim shoairafe53332b8e3
diff --git a/scrapling/engines/static.py b/scrapling/engines/static.py
index 273e14b..35b575a 100644
--- a/scrapling/engines/static.py
+++ b/scrapling/engines/static.py
@@ -45,7 +45,7 @@ class StaticEngine:
encoding=response.encoding or 'utf-8',
cookies=dict(response.cookies),
headers=dict(response.headers),
- request_headers=response.request.headers,
+ request_headers=dict(response.request.headers),
adaptor_arguments=self.adaptor_arguments
)