diff options
author | Vitiko <[email protected]> | 2022-12-17 01:48:05 -0400 |
---|---|---|
committer | Vitiko <[email protected]> | 2022-12-20 15:47:11 -0400 |
commit | e6864a9001474ede32ccc980c0399ab2ee097956 (patch) | |
tree | 1c3c08c29ce712a9305cb0168bc65c2c75a9a0ae | |
parent | 82c9e1434108f5c030da08a09375d4ba3ed8d50b (diff) | |
download | bazarr-e6864a9001474ede32ccc980c0399ab2ee097956.tar.gz bazarr-e6864a9001474ede32ccc980c0399ab2ee097956.zip |
Subf2m provider: handle 403
-rw-r--r-- | libs/subliminal_patch/providers/subf2m.py | 5 |
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: |