refactor: remove old and unnecessary indexers check in config validation

This commit is contained in:
g0ldyy
2025-11-26 19:04:15 +01:00
parent 52c7718c0e
commit 5a7fc2bdb1
2 changed files with 6 additions and 5 deletions
-3
View File
@@ -11,9 +11,6 @@ def config_check(b64config: str):
try:
config = orjson.loads(base64.b64decode(b64config).decode())
if "indexers" in config:
return False
validated_config = ConfigModel(**config)
validated_config = validated_config.model_dump()
+6 -2
View File
@@ -220,12 +220,16 @@ class YGGTorrentScraper(BaseScraper):
semaphore = asyncio.Semaphore(limit)
# Fetch page 0 first to get total results
results, total_results = await self._scrape_page(self._domain, request.title, 0, semaphore)
results, total_results = await self._scrape_page(
self._domain, request.title, 0, semaphore
)
if total_results > 50:
tasks = []
for offset in range(50, total_results, 50):
tasks.append(self._scrape_page(self._domain, request.title, offset, semaphore))
tasks.append(
self._scrape_page(self._domain, request.title, offset, semaphore)
)
if tasks:
pages_results = await asyncio.gather(*tasks)