From 1a5d688e5646c23b9574b11aef18b403be4f9070 Mon Sep 17 00:00:00 2001 From: Akimio521 Date: Thu, 4 Jul 2024 17:49:57 +0800 Subject: [PATCH] =?UTF-8?q?fix(Aist2Strm):=E4=BF=AE=E5=A4=8D=5Fsign?= =?UTF-8?q?=E6=96=B9=E6=B3=95=E4=B8=ADdata=E8=A7=A3=E7=A0=81=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/Alist2Strm.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/Alist2Strm.py b/modules/Alist2Strm.py index f261d19..790218c 100644 --- a/modules/Alist2Strm.py +++ b/modules/Alist2Strm.py @@ -3,6 +3,7 @@ import hashlib import base64 import asyncio +from urllib.parse import unquote from requests import Session from aiohttp import ClientSession as AsyncSession from pathlib import Path @@ -124,7 +125,7 @@ async def _processer(self) -> None: async with asyncio.TaskGroup() as tg: for alist_path_cls in fs.rglob("*.*"): - await tg.create_task(self._file_processer(alist_path_cls)) + tg.create_task(self._file_processer(alist_path_cls)) if self.session: if self.async_mode: @@ -214,6 +215,7 @@ def _sign(self, secret_key: Optional[str], data: str) -> str: if secret_key == "" or secret_key == None: return "" + data = unquote(data) h = hmac.new(secret_key.encode(), digestmod=hashlib.sha256) expire_time_stamp = str(0) h.update((data + ":" + expire_time_stamp).encode())