summaryrefslogtreecommitdiffhomepage
path: root/libs
diff options
context:
space:
mode:
authorVitiko <[email protected]>2022-12-17 01:48:05 -0400
committerVitiko <[email protected]>2022-12-20 15:47:11 -0400
commite6864a9001474ede32ccc980c0399ab2ee097956 (patch)
tree1c3c08c29ce712a9305cb0168bc65c2c75a9a0ae /libs
parent82c9e1434108f5c030da08a09375d4ba3ed8d50b (diff)
downloadbazarr-e6864a9001474ede32ccc980c0399ab2ee097956.tar.gz
bazarr-e6864a9001474ede32ccc980c0399ab2ee097956.zip
Subf2m provider: handle 403
Diffstat (limited to 'libs')
-rw-r--r--libs/subliminal_patch/providers/subf2m.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/libs/subliminal_patch/providers/subf2m.py b/libs/subliminal_patch/providers/subf2m.py
index 262ebc309..5ab637c6f 100644
--- a/libs/subliminal_patch/providers/subf2m.py
+++ b/libs/subliminal_patch/providers/subf2m.py
@@ -147,6 +147,11 @@ class Subf2mProvider(Provider):
for n in range(retry):
req = self._session.get(url, stream=True)
+
+ if req.status_code == 403:
+ logger.debug("Access to this resource is forbidden: %s", url)
+ break
+
# Sometimes subf2m will return a 503 code. This error usually disappears
# retrying the query
if req.status_code == 503: