From 8dad86c8aa90edf69d7ae87b34731d65574c371f Mon Sep 17 00:00:00 2001 From: Ori Date: Wed, 8 Apr 2020 18:39:38 +0300 Subject: [PATCH] wizdom: some subtitle files are empty, skip --- libs/subliminal_patch/providers/wizdom.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libs/subliminal_patch/providers/wizdom.py b/libs/subliminal_patch/providers/wizdom.py index f55df5167..44808a3e8 100644 --- a/libs/subliminal_patch/providers/wizdom.py +++ b/libs/subliminal_patch/providers/wizdom.py @@ -197,6 +197,9 @@ class WizdomProvider(Provider): r = self.session.get(url, headers={'Referer': subtitle.page_link}, timeout=10) r.raise_for_status() + if len(r.content) == 0: + return + # open the zip with zipfile.ZipFile(io.BytesIO(r.content)) as zf: # remove some filenames from the namelist