Paijo commited on
update app/hunter/strategy.py
Browse files- app/hunter/strategy.py +23 -0
app/hunter/strategy.py
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from abc import ABC, abstractmethod
|
| 2 |
+
from typing import List, Dict, Any
|
| 3 |
+
|
| 4 |
+
|
| 5 |
+
class BaseStrategy(ABC):
|
| 6 |
+
"""
|
| 7 |
+
Abstract base class for proxy discovery strategies.
|
| 8 |
+
Each strategy implements a method to find potential proxy source URLs.
|
| 9 |
+
"""
|
| 10 |
+
|
| 11 |
+
@abstractmethod
|
| 12 |
+
async def discover(self) -> List[str]:
|
| 13 |
+
"""
|
| 14 |
+
Run the discovery process.
|
| 15 |
+
Returns a list of raw URLs that might contain proxies.
|
| 16 |
+
"""
|
| 17 |
+
pass
|
| 18 |
+
|
| 19 |
+
@property
|
| 20 |
+
@abstractmethod
|
| 21 |
+
def name(self) -> str:
|
| 22 |
+
"""Name of the strategy (e.g., 'github', 'ai')"""
|
| 23 |
+
pass
|