From 52c7718c0eaf6eeee2264022b268075257eb36f2 Mon Sep 17 00:00:00 2001 From: g0ldyy <153996346+g0ldyy@users.noreply.github.com> Date: Wed, 26 Nov 2025 17:35:48 +0100 Subject: [PATCH] fix: handle missing results count in YGGTorrent scraper --- comet/scrapers/yggtorrent.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/comet/scrapers/yggtorrent.py b/comet/scrapers/yggtorrent.py index af26897..ee7b513 100644 --- a/comet/scrapers/yggtorrent.py +++ b/comet/scrapers/yggtorrent.py @@ -177,6 +177,8 @@ class YGGTorrentScraper(BaseScraper): total_results = 0 if offset == 0: count_match = RESULTS_COUNT_PATTERN.search(html_content) + if not count_match: + return [], 0 total_results = int(count_match.group(1)) tasks = []