From 769df983678b834d88152ed9387d99bcfd56ac57 Mon Sep 17 00:00:00 2001 From: Rhilip Date: Thu, 5 Sep 2019 10:50:00 +0800 Subject: [PATCH] =?UTF-8?q?perf(Cookies):=20=E4=BD=BF=E7=94=A8=E5=AD=97?= =?UTF-8?q?=E5=85=B8=E6=8E=A8=E5=AF=BC=E5=BC=8F=E4=BC=98=E5=8C=96Cookies?= =?UTF-8?q?=E7=94=9F=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/cookie.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/utils/cookie.py b/utils/cookie.py index 64118e2..3e01f7a 100644 --- a/utils/cookie.py +++ b/utils/cookie.py @@ -13,7 +13,4 @@ def cookies_raw2jar(raw: str) -> dict: raise ValueError("The Cookies is not allowed to be empty.") cookie = SimpleCookie(raw) - cookies = {} - for key, morsel in cookie.items(): - cookies[key] = morsel.value - return cookies + return {key: morsel.value for key, morsel in cookie.items()}