search-web-MCP-server / src /core /interface /scraper_interface.py
Olaemad's picture
Add initial project structure with configuration and factory classes
237ef97
raw
history blame contribute delete
679 Bytes
from abc import ABC, abstractmethod
from src.models.scrape_models import ScrapeQuery, ScrapeResult
class ScraperInterface(ABC):
@abstractmethod
def get_url_content(url_parameters: ScrapeQuery) -> ScrapeResult:
"""
Fetches the content of the specified URL and returns the result as a ScrapeResult object.
Args:
url_parameters (ScrapeQuery): The URL parameters to fetch content from.
Returns:
ScrapeResult: An object containing the scraped content and related metadata.
Raises:
NotImplementedError: This method should be implemented by subclasses.
"""
raise NotImplementedError