From 304ad160e0157ed98d3bc30d5512b23e9ce233e9 Mon Sep 17 00:00:00 2001 From: Vitiko Date: Wed, 14 Jun 2023 04:08:36 -0400 Subject: [PATCH] Subf2m provider: improve queries --- libs/subliminal_patch/providers/subf2m.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/subliminal_patch/providers/subf2m.py b/libs/subliminal_patch/providers/subf2m.py index 2f400287d..ac0daafc2 100644 --- a/libs/subliminal_patch/providers/subf2m.py +++ b/libs/subliminal_patch/providers/subf2m.py @@ -185,9 +185,9 @@ class Subf2mProvider(Provider): logger.debug("Access to this resource is forbidden: %s", url) break - # Sometimes subf2m will return a 503 code. This error usually disappears + # Sometimes subf2m will return 404 or 503. This error usually disappears # retrying the query - if req.status_code == 503: + if req.status_code in (404, 503): logger.debug("503 returned. Trying again [%d] in 3 seconds", n + 1) time.sleep(3) continue