From 522c9eb031bf2f22d9e52350352f8deabdd90de3 Mon Sep 17 00:00:00 2001 From: MainKronos Date: Tue, 4 Apr 2023 21:30:11 +0200 Subject: [PATCH] fix cookie --- animeworld/utility.py | 6 +++--- setup.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/animeworld/utility.py b/animeworld/utility.py index df91dc0..42b46df 100644 --- a/animeworld/utility.py +++ b/animeworld/utility.py @@ -23,15 +23,15 @@ def __init__(self) -> None: self.fixCookie() def fixCookie(self): - AWCookieVerify = re.compile(br'document\.cookie="AWCookieVerify=(.+) ;') + SecurityAW = re.compile(br'document\.cookie="SecurityAW=(.+) ;') csrf_token = re.compile(br'') for _ in range(2): # numero di tentativi res = self.get("https://www.animeworld.tv") - m = AWCookieVerify.search(res.content) + m = SecurityAW.search(res.content) if m: - self.cookies.update({'AWCookieVerify': m.group(1).decode('utf-8')}) + self.cookies.update({'SecurityAW': m.group(1).decode('utf-8')}) continue m = csrf_token.search(res.content) diff --git a/setup.py b/setup.py index 1730e61..db75fc1 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name="animeworld", - version="1.5.0", + version="1.5.1", author="MainKronos", description="AnimeWorld UNOFFICIAL API", long_description=long_description,