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

style: update post requests type hints to be more accurate

Karim shoair5aa178a76ed1
diff --git a/scrapling/engines/_browsers/_types.py b/scrapling/engines/_browsers/_types.py
index 8391e9c..47322da 100644
--- a/scrapling/engines/_browsers/_types.py
+++ b/scrapling/engines/_browsers/_types.py
@@ -1,3 +1,5 @@
+from io import BytesIO
+
from curl_cffi.requests import (
ProxySpec,
CookieTypes,
@@ -50,7 +52,7 @@ if TYPE_CHECKING: # pragma: no cover
# Types for POST/PUT/DELETE request method parameters
class DataRequestParams(GetRequestParams, total=False):
- data: Optional[Dict | str]
+ data: Optional[Dict[str, str] | List[Tuple] | str | BytesIO | bytes]
json: Optional[Dict | List]
# Types for browser session