weixin_category_top.py 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. """
  2. @author: luojunhui
  3. """
  4. import json
  5. import requests
  6. url = "https://tophub.today/do"
  7. data = {
  8. "p": 1,
  9. "day": "2025-02-3",
  10. "nodeid": "5952",
  11. "t": "itemsbydate",
  12. "c": "node"
  13. }
  14. headers = {
  15. 'accept': 'application/json, text/javascript, */*; q=0.01',
  16. 'accept-language': 'zh,zh-CN;q=0.9',
  17. 'content-type': 'application/x-www-form-urlencoded; charset=UTF-8',
  18. 'origin': 'https://tophub.today',
  19. 'priority': 'u=1, i',
  20. 'cookie': 'itc_center_user=687fMUyII7NF3Z7BXajouKHhRuaQ0naC1NPNVN9cTdtkjxZff0O0ryw5tnK7xCg9CVsqPY4q%2BfMhkcamxx8F1ZQUHZJbuGhjYM4%2FAiDyXpQTTA;',
  21. 'referer': 'https://tophub.today/n/x9ozmmYeXb',
  22. 'sec-ch-ua': '"Not(A:Brand";v="99", "Google Chrome";v="133", "Chromium";v="133"',
  23. 'sec-ch-ua-mobile': '?0',
  24. 'sec-ch-ua-platform': '"macOS"',
  25. 'sec-fetch-dest': 'empty',
  26. 'sec-fetch-mode': 'cors',
  27. 'sec-fetch-site': 'same-origin',
  28. 'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36',
  29. 'x-requested-with': 'XMLHttpRequest'
  30. }
  31. response = requests.request("POST", url, headers=headers, data=data)
  32. response_json = response.json()
  33. print(json.dumps(response_json, indent=4, ensure_ascii=False))