Skip to content

Commit

Permalink
Fixed greeksubs provider. #1477
Browse files Browse the repository at this point in the history
  • Loading branch information
morpheus65535 committed Jul 22, 2021
1 parent 6eeaa46 commit 5f6b201
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions libs/subliminal_patch/providers/greeksubs.py
Expand Up @@ -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'])

Expand Down

0 comments on commit 5f6b201

Please sign in to comment.