From 7db932ff66c86c3fd30502f5bdadb2a703b88bf7 Mon Sep 17 00:00:00 2001 From: g0ldyy <153996346+g0ldyy@users.noreply.github.com> Date: Mon, 5 Jan 2026 21:30:35 +0100 Subject: [PATCH] fix: add error handling for torrent title extraction and unreleased content in comet scraper --- comet/scrapers/comet.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/comet/scrapers/comet.py b/comet/scrapers/comet.py index 48d8dfd..cd1cd7d 100644 --- a/comet/scrapers/comet.py +++ b/comet/scrapers/comet.py @@ -17,8 +17,13 @@ class CometScraper(BaseScraper): for torrent in results["streams"]: title_full = torrent["description"] - title = title_full.split("\n")[0].split("📄 ")[1] + if title_full == "Content not digitally released yet.": + break + try: + title = title_full.split("\n")[0].split("📄 ")[1] + except: + continue seeders = ( int(title_full.split("👤 ")[1].split(" ")[0]) if "👤" in title_full