🕷️ 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
Handle importing `SupportsIndex` in Python 3.6 and 3.7
Karim shoair84b0ea6121f8
diff --git a/scrapling/parser.py b/scrapling/parser.pyindex c0cc7be..375d384 100644--- a/scrapling/parser.py+++ b/scrapling/parser.py@@ -1,6 +1,11 @@import osfrom difflib import SequenceMatcher-from typing import Any, Dict, List, Tuple, Optional, Pattern, SupportsIndex, Union, Callable, Generator+from typing import Any, Dict, List, Tuple, Optional, Pattern, Union, Callable, Generator+try:+ from typing import SupportsIndex+except ImportError:+ # 'SupportsIndex' got added in Python 3.8+ SupportsIndex = Nonefrom scrapling.translator import HTMLTranslatorfrom scrapling.mixins import SelectorsGeneration