flomo.py 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. import requests
  2. import time
  3. headers = {
  4. 'authority': 'flomoapp.com',
  5. 'accept': 'application/json, text/plain, */*',
  6. 'accept-language': 'zh-CN,zh;q=0.9,en;q=0.8',
  7. 'authorization': 'Bearer 1214040|p4pmlD8OOqTlzj7hiwkyAjWb6Q9HyQPyWnR322t5',
  8. 'cache-control': 'no-cache',
  9. 'content-type': 'application/json;charset=UTF-8',
  10. 'origin': 'https://v.flomoapp.com',
  11. 'pragma': 'no-cache',
  12. 'referer': 'https://v.flomoapp.com/',
  13. 'sec-ch-ua': '"Chromium";v="110", "Not A(Brand";v="24", "Google Chrome";v="110"',
  14. 'sec-ch-ua-mobile': '?0',
  15. 'sec-ch-ua-platform': '"macOS"',
  16. 'sec-fetch-dest': 'empty',
  17. 'sec-fetch-mode': 'cors',
  18. 'sec-fetch-site': 'same-site',
  19. 'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36',
  20. }
  21. timestamp = int(time.time())
  22. json_data = {
  23. 'content': '<p>test2</p>',
  24. 'created_at': timestamp,
  25. 'source': 'web',
  26. 'file_ids': [],
  27. 'tz': '8:0',
  28. 'timestamp': timestamp,
  29. 'api_key': 'flomo_web',
  30. 'app_version': '2.0',
  31. 'webp': '1',
  32. 'sign': '3c2b16926b7ecdaeb58bac6c272f044b',
  33. }
  34. response = requests.put('https://flomoapp.com/api/v1/memo', headers=headers, json=json_data)
  35. print(response.text)