From 4a341869858103a60dccf712e70e6ad97f311a29 Mon Sep 17 00:00:00 2001 From: Vitiko Date: Fri, 26 Jul 2024 19:16:37 -0400 Subject: [PATCH] SuperSubtitles: handle KeyError for movie searches --- custom_libs/subliminal_patch/providers/supersubtitles.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/custom_libs/subliminal_patch/providers/supersubtitles.py b/custom_libs/subliminal_patch/providers/supersubtitles.py index c3ecb06a3..cc7752925 100644 --- a/custom_libs/subliminal_patch/providers/supersubtitles.py +++ b/custom_libs/subliminal_patch/providers/supersubtitles.py @@ -455,7 +455,13 @@ class SuperSubtitlesProvider(Provider, ProviderSubtitleArchiveMixin): soup = ParserBeautifulSoup(r, ['lxml']) tables = soup.find_all("table") - tables = tables[0].find_all("tr") + + try: + tables = tables[0].find_all("tr") + except IndexError: + logger.debug("No tables found for %s", url) + return [] + i = 0 for table in tables: