2024-04-21 05:22:59 +00:00
|
|
|
try:
|
|
|
|
import brotli
|
|
|
|
has_brotli = True
|
|
|
|
except ImportError:
|
|
|
|
has_brotli = False
|
|
|
|
|
2024-01-29 17:14:46 +00:00
|
|
|
DEFAULT_HEADERS = {
|
2024-03-12 01:06:06 +00:00
|
|
|
"accept": "*/*",
|
2024-04-21 05:22:59 +00:00
|
|
|
"accept-encoding": "gzip, deflate" + (", br" if has_brotli else ""),
|
2024-03-12 01:06:06 +00:00
|
|
|
"accept-language": "en-US",
|
2024-04-21 05:22:59 +00:00
|
|
|
"referer": "",
|
|
|
|
"sec-ch-ua": "\"Google Chrome\";v=\"123\", \"Not:A-Brand\";v=\"8\", \"Chromium\";v=\"123\"",
|
|
|
|
"sec-ch-ua-arch": "\"x86\"",
|
|
|
|
"sec-ch-ua-bitness": "\"64\"",
|
|
|
|
"sec-ch-ua-full-version": "\"123.0.6312.122\"",
|
|
|
|
"sec-ch-ua-full-version-list": "\"Google Chrome\";v=\"123.0.6312.122\", \"Not:A-Brand\";v=\"8.0.0.0\", \"Chromium\";v=\"123.0.6312.122\"",
|
|
|
|
"sec-ch-ua-mobile": "?0",
|
|
|
|
"sec-ch-ua-model": "\"\"",
|
|
|
|
"sec-ch-ua-platform": "\"Windows\"",
|
|
|
|
"sec-ch-ua-platform-version": '"15.0.0"',
|
|
|
|
"sec-fetch-dest": "empty",
|
|
|
|
"sec-fetch-mode": "cors",
|
|
|
|
"sec-fetch-site": "same-origin",
|
|
|
|
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36",
|
2024-03-15 10:46:06 +00:00
|
|
|
}
|
|
|
|
WEBVIEW_HAEDERS = {
|
|
|
|
"Accept": "*/*",
|
|
|
|
"Accept-Encoding": "gzip, deflate, br",
|
|
|
|
"Accept-Language": "",
|
|
|
|
"Referer": "",
|
|
|
|
"Sec-Fetch-Dest": "empty",
|
|
|
|
"Sec-Fetch-Mode": "cors",
|
|
|
|
"Sec-Fetch-Site": "same-origin",
|
|
|
|
"User-Agent": "",
|
2024-01-29 17:14:46 +00:00
|
|
|
}
|