🕷️ 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
style(spiders): make parse function abstract
Karim shoair02c9dffc7700
diff --git a/scrapling/spiders/spider.py b/scrapling/spiders/spider.pyindex ac7174f..aedab1a 100644--- a/scrapling/spiders/spider.py+++ b/scrapling/spiders/spider.py@@ -1,6 +1,6 @@import logging-from abc import ABCfrom pathlib import Path+from abc import ABC, abstractmethodimport anyio@@ -139,6 +139,7 @@ class Spider(ABC):for url in self.start_urls:yield Request(url, sid=self._session_manager.default_session_id)+ @abstractmethodasync def parse(self, response: "Response") -> AsyncGenerator[Dict[str, Any] | Request | None, None]:"""Default callback for processing responses"""raise NotImplementedError(f"{self.__class__.__name__} must implement parse() method")