defaults.py 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. try:
  2. import brotli
  3. has_brotli = True
  4. except ImportError:
  5. has_brotli = False
  6. DEFAULT_HEADERS = {
  7. "accept": "*/*",
  8. "accept-encoding": "gzip, deflate" + (", br" if has_brotli else ""),
  9. "accept-language": "en-US",
  10. "referer": "",
  11. "sec-ch-ua": "\"Google Chrome\";v=\"123\", \"Not:A-Brand\";v=\"8\", \"Chromium\";v=\"123\"",
  12. "sec-ch-ua-arch": "\"x86\"",
  13. "sec-ch-ua-bitness": "\"64\"",
  14. "sec-ch-ua-full-version": "\"123.0.6312.122\"",
  15. "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\"",
  16. "sec-ch-ua-mobile": "?0",
  17. "sec-ch-ua-model": "\"\"",
  18. "sec-ch-ua-platform": "\"Windows\"",
  19. "sec-ch-ua-platform-version": '"15.0.0"',
  20. "sec-fetch-dest": "empty",
  21. "sec-fetch-mode": "cors",
  22. "sec-fetch-site": "same-origin",
  23. "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",
  24. }
  25. WEBVIEW_HAEDERS = {
  26. "Accept": "*/*",
  27. "Accept-Encoding": "gzip, deflate, br",
  28. "Accept-Language": "",
  29. "Referer": "",
  30. "Sec-Fetch-Dest": "empty",
  31. "Sec-Fetch-Mode": "cors",
  32. "Sec-Fetch-Site": "same-origin",
  33. "User-Agent": "",
  34. }