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(parser): more accurate type hints

Karim shoair3cca3fd56b54
diff --git a/scrapling/parser.py b/scrapling/parser.py
index c82a270..1a46f1a 100644
--- a/scrapling/parser.py
+++ b/scrapling/parser.py
@@ -474,7 +474,7 @@ class Adaptor(SelectorsGeneration):
def css(self, selector: str, identifier: str = '',
auto_match: bool = False, auto_save: bool = False, percentage: int = 0
- ) -> Union['Adaptors[Adaptor]', List]:
+ ) -> Union['Adaptors[Adaptor]', List, 'TextHandlers[TextHandler]']:
"""Search current tree with CSS3 selectors
**Important:
@@ -517,7 +517,7 @@ class Adaptor(SelectorsGeneration):
def xpath(self, selector: str, identifier: str = '',
auto_match: bool = False, auto_save: bool = False, percentage: int = 0, **kwargs: Any
- ) -> Union['Adaptors[Adaptor]', List]:
+ ) -> Union['Adaptors[Adaptor]', List, 'TextHandlers[TextHandler]']:
"""Search current tree with XPath selectors
**Important: