2024-01-21 17:45:01 +00:00
|
|
|
from __future__ import annotations
|
|
|
|
|
|
|
|
|
|
import ssl
|
2024-10-30 11:12:21 +03:00
|
|
|
from functools import cache
|
2024-01-21 17:45:01 +00:00
|
|
|
from types import MappingProxyType
|
|
|
|
|
|
|
|
|
|
import certifi
|
2024-07-09 03:08:30 +03:00
|
|
|
from aiohttp import DummyCookieJar, hdrs
|
2024-01-23 09:37:29 +03:00
|
|
|
|
2024-02-07 10:25:01 +03:00
|
|
|
HEADERS: MappingProxyType[str, str] = MappingProxyType({
|
|
|
|
|
hdrs.USER_AGENT: (
|
2025-03-06 06:49:24 +00:00
|
|
|
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36" # noqa: E501
|
2024-02-07 10:25:01 +03:00
|
|
|
)
|
|
|
|
|
})
|
2024-01-21 17:45:01 +00:00
|
|
|
SSL_CONTEXT = ssl.create_default_context(cafile=certifi.where())
|
2025-02-05 06:22:56 +00:00
|
|
|
SSL_CONTEXT.set_alpn_protocols(("http/1.1",))
|
2025-02-26 14:27:37 +03:00
|
|
|
get_cookie_jar = cache(DummyCookieJar)
|