File tree Expand file tree Collapse file tree 3 files changed +16
-2
lines changed
Expand file tree Collapse file tree 3 files changed +16
-2
lines changed Original file line number Diff line number Diff line change 2525from maimai_py .providers import *
2626from maimai_py .providers .base import IRecordProvider
2727from maimai_py .utils import UNSET , _UnsetSentinel
28+ from maimai_py .utils .cookies import NullCookieJar
2829
2930PlayerItemType = TypeVar ("PlayerItemType" , bound = PlayerItem )
3031
@@ -860,7 +861,7 @@ def __init__(
860861 cache_ttl: the TTL of the cache, defaults to 60 * 60 * 24.
861862 kwargs: other arguments to pass to the `httpx.AsyncClient`.
862863 """
863- self ._client = AsyncClient (timeout = timeout , ** kwargs )
864+ self ._client = AsyncClient (timeout = timeout , cookies = NullCookieJar (), ** kwargs )
864865 self ._cache = SimpleMemoryCache () if isinstance (cache , _UnsetSentinel ) else cache
865866 self ._cache_ttl = cache_ttl
866867
Original file line number Diff line number Diff line change 1+ from http .cookiejar import CookieJar
2+
3+
4+ class NullCookieJar (CookieJar ):
5+ """A CookieJar that rejects all cookies."""
6+
7+ def extract_cookies (self , response , request ):
8+ """For extracting and saving cookies. This implementation does nothing"""
9+ pass
10+
11+ def set_cookie (self , cookie ):
12+ """Normally for setting a cookie. This implementation does nothing"""
13+ pass
Original file line number Diff line number Diff line change 11[tool .poetry ]
22name = " maimai-py"
3- version = " 1.4.1rc1 "
3+ version = " 1.4.1rc2 "
44description = " The definitive python wrapper for MaimaiCN."
55authors = [" Usagi no Niku <chenbohan911@163.com>" ]
66license = " MIT"
You can’t perform that action at this time.
0 commit comments