From d9c662fe0058182d48396d3e5256202c90f53258 Mon Sep 17 00:00:00 2001 From: Itz-fork Date: Sat, 20 Aug 2022 11:04:39 +0530 Subject: [PATCH] Added support for 301 responses --- unzipper/lib/downloader/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unzipper/lib/downloader/__init__.py b/unzipper/lib/downloader/__init__.py index 488bdd4..2246e8a 100644 --- a/unzipper/lib/downloader/__init__.py +++ b/unzipper/lib/downloader/__init__.py @@ -71,7 +71,7 @@ async def _from_direct_link(self, url: str, path: str, message: Message = None, if resp.status == 200: pass # Support for temporarily moved resources - elif resp.status == 302: + elif resp.status in (301, 302): resp = await session.get(url, timeout=None, allow_redirects=True) # Raise HttpStatusError if response status isn't 200 else: