mirror of
https://github.com/daimyomizukagebay61/SteamPanel.git
synced 2026-08-26 09:27:42 +00:00
v 3.0.3
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
from typing import (
|
||||
Dict,
|
||||
Mapping,
|
||||
)
|
||||
|
||||
from pysteamauth.abstract import CookieStorageAbstract
|
||||
|
||||
|
||||
class BaseCookieStorage(CookieStorageAbstract):
|
||||
|
||||
def __init__(self):
|
||||
self.cookies: Dict[str, Mapping[str, Mapping[str, str]]] = {}
|
||||
|
||||
async def set(self, login: str, cookies: Mapping[str, Mapping[str, str]]) -> None:
|
||||
self.cookies[login] = cookies
|
||||
|
||||
async def get(self, login: str, domain: str) -> Mapping[str, str]:
|
||||
cookies = self.cookies.get(login)
|
||||
if not cookies:
|
||||
return {}
|
||||
return cookies.get(domain, {})
|
||||
Reference in New Issue
Block a user