File size: 577 Bytes
bb2b876
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
from abc import ABC, abstractmethod
from typing import List, Dict, Any


class BaseStrategy(ABC):
    """
    Abstract base class for proxy discovery strategies.
    Each strategy implements a method to find potential proxy source URLs.
    """

    @abstractmethod
    async def discover(self) -> List[str]:
        """
        Run the discovery process.
        Returns a list of raw URLs that might contain proxies.
        """
        pass

    @property
    @abstractmethod
    def name(self) -> str:
        """Name of the strategy (e.g., 'github', 'ai')"""
        pass