From 5f6b201a71be4002e517f052ede9215f9a81d748 Mon Sep 17 00:00:00 2001 From: morpheus65535 Date: Thu, 22 Jul 2021 07:20:56 -0400 Subject: [PATCH] Fixed greeksubs provider. #1477 --- libs/subliminal_patch/providers/greeksubs.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libs/subliminal_patch/providers/greeksubs.py b/libs/subliminal_patch/providers/greeksubs.py index ddd7f9d80..bec0749c6 100644 --- a/libs/subliminal_patch/providers/greeksubs.py +++ b/libs/subliminal_patch/providers/greeksubs.py @@ -75,12 +75,12 @@ def query(self, video, languages, imdb_id, season=None, episode=None): r = self.session.get(search_link, timeout=30) # 404 is returned if the imdb_id was not found - if r.status_code != 404: - r.raise_for_status() + if r.status_code == 404: + logger.debug('IMDB id {} not found on greeksubs'.format(imdb_id)) + return subtitles if r.status_code != 200: - logger.debug('No subtitles found') - return subtitles + r.raise_for_status() soup_page = ParserBeautifulSoup(r.content.decode('utf-8', 'ignore'), ['html.parser'])