demo.py 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. # -*- coding: utf-8 -*-
  2. # Author : Charley
  3. # Python : 3.10.8
  4. # Date : 2025/11/12 13:34
  5. import requests
  6. import json
  7. headers = {
  8. "authority": "kurabu.feishezhang.com",
  9. "accept": "*/*",
  10. "accept-language": "zh-CN,zh;q=0.9",
  11. "content-type": "application/json",
  12. "referer": "https://servicewechat.com/wxa5880b2d8e8a0f37/17/page-frame.html",
  13. "sec-fetch-dest": "empty",
  14. "sec-fetch-mode": "cors",
  15. "sec-fetch-site": "cross-site",
  16. "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 MicroMessenger/7.0.20.1781(0x6700143B) NetType/WIFI MiniProgramEnv/Windows WindowsWechat/WMPF WindowsWechat(0x63090c33) XWEB/9129",
  17. "xweb_xhr": "1"
  18. }
  19. # url = "https://kurabu.feishezhang.com/api.php"
  20. # params = {
  21. # "s": "reward/MiniappGetPreviousAvailableSession",
  22. # "system_type": "default",
  23. # "application": "app",
  24. # "application_client_type": "weixin",
  25. # "token": "26eed48c80bad053717687daef3a8668",
  26. # # "token": token,
  27. # "uuid": "0b2f5448-a8ca-4dbe-9bac-0c49a10d9873",
  28. # "ajax": "ajax"
  29. # }
  30. #
  31. # total_sessions = 3
  32. # # for i in range(3):
  33. # # log.debug(f"{inspect.currentframe().f_code.co_name} 获取第{i + 1}个赏")
  34. # data = {
  35. # # "reward_pool_id": reward_pool_id,
  36. # # "reward_pool_id": "c058b102-8ea6-48c2-9195-1216b010f579",
  37. # "reward_pool_id": "50977f8b-630c-4cc1-b924-a22c33990624",
  38. # "current_session_num": 1
  39. # # "current_session_num": 1
  40. # }
  41. # response = requests.post(url, headers=headers, params=params, json=data)
  42. # print(response.text)
  43. # # response.raise_for_status()
  44. # #
  45. # resp_json = response.json()
  46. # if resp_json['code'] == 0:
  47. # session_id = resp_json.get('data', {}).get('id')
  48. # print(session_id)
  49. url = "https://kurabu.feishezhang.com/api.php"
  50. params = {
  51. "s": "reward/MiniappGetCurrentSessionDrawRecords",
  52. "system_type": "default",
  53. "application": "app",
  54. "application_client_type": "weixin",
  55. "token": "26eed48c80bad053717687daef3a8668",
  56. "uuid": "227de1d4-c429-4e73-b972-42c26560ed83",
  57. "ajax": "ajax",
  58. # "session_id": "3065",
  59. "session_id": 1066,
  60. "record_page": str(4)
  61. # "record_page": "1"
  62. }
  63. response = requests.get(url, headers=headers, params=params)
  64. print(response.text)
  65. """
  66. 2 ->
  67. 3 ->
  68. """
  69. # 3076