single_video_dev.py 380 B

12345678910111213141516171819202122
  1. """
  2. @author: luojunhui
  3. """
  4. import json
  5. import time
  6. import requests
  7. url = "http://localhost:8888/singleVideo"
  8. body = {
  9. "videoId": 21059419
  10. }
  11. a = time.time()
  12. header = {
  13. "Content-Type": "application/json",
  14. }
  15. response = requests.post(url, json=body, headers=header, timeout=600)
  16. b = time.time()
  17. print(b - a)
  18. print(json.dumps(response.json(), ensure_ascii=False, indent=4))