From 37ba592b1723445a42088bd26e5087f1d6ec7fe2 Mon Sep 17 00:00:00 2001 From: Steve Adams Date: Wed, 4 Nov 2020 14:14:16 +1100 Subject: yifysubtitles handle 404 when imdb_id not found yifysubtitles handle 404 when imdb_id not found --- libs/subliminal_patch/providers/yifysubtitles.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/subliminal_patch/providers/yifysubtitles.py b/libs/subliminal_patch/providers/yifysubtitles.py index bd1a1102a..21cc3eac9 100644 --- a/libs/subliminal_patch/providers/yifysubtitles.py +++ b/libs/subliminal_patch/providers/yifysubtitles.py @@ -147,7 +147,9 @@ class YifySubtitlesProvider(Provider): if response.status_code == 200: break - response.raise_for_status() + # 404 is returned if the imdb_id was not found + if response.status_code != 404: + response.raise_for_status() if response.status_code != 200: logger.debug('No subtitles found') -- cgit v1.2.3