fix: keep site parsing interval global
This commit is contained in:
@@ -55,14 +55,6 @@ def validate_source_config(platform: str, config: dict[str, Any]) -> None:
|
||||
raise ValueError("max_items должен быть целым числом") from exc
|
||||
if not 1 <= max_items <= 100:
|
||||
raise ValueError("max_items должен быть от 1 до 100")
|
||||
try:
|
||||
interval_minutes = int(config.get("interval_minutes", 30))
|
||||
except (TypeError, ValueError) as exc:
|
||||
raise ValueError("interval_minutes должен быть целым числом") from exc
|
||||
if not 1 <= interval_minutes <= 10080:
|
||||
raise ValueError("interval_minutes должен быть от 1 до 10080")
|
||||
|
||||
|
||||
def _posted_at(value: Any) -> datetime:
|
||||
try:
|
||||
parsed = datetime.fromisoformat(str(value).replace("Z", "+00:00"))
|
||||
|
||||
Reference in New Issue
Block a user