api.py 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #!/usr/bin/env python
  2. # -*- encoding: utf-8 -*-
  3. '''
  4. @Contact : liuyuqi.gov@msn.cn
  5. @Time : 2023/05/17 21:17:34
  6. @License : Copyright © 2017-2022 liuyuqi. All Rights Reserved.
  7. @Desc : 摩点API配置
  8. '''
  9. host = "https://www.modian.com"
  10. api_host = "https://zhongchou.modian.com"
  11. project_info_url = api_host + "/item"
  12. headers = {
  13. "Host": "zhongchou.modian.com",
  14. "Connection": "keep-alive",
  15. "Cache-Control": "max-age=0",
  16. "Upgrade-Insecure-Requests": "1",
  17. "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 "
  18. "(KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36",
  19. "Accept": "application/json, text/plain, */*",
  20. "Accept-Language": "zh-CN,zh;q=0.9,en;q=0.8",
  21. "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
  22. "X-Requested-With": "XMLHttpRequest",
  23. }
  24. api_endpoints = {
  25. "login": host + "/login",
  26. "user_info": host + "/user/info",
  27. "check_in": host + "/user/checkin",
  28. "check_in_status": host + "/user/checkin/status",
  29. "project_list": api_host + "/item/list",
  30. "project_detail": api_host + "/item/{project_id}",
  31. "project_support": api_host + "/item/support",
  32. "project_comments": api_host + "/item/{project_id}/comments",
  33. }