matchArticle_dev.py 460 B

123456789101112131415161718192021222324
  1. """
  2. @author: luojunhui
  3. """
  4. import json
  5. import time
  6. import requests
  7. url = "http://47.99.132.47:8888/matchArticleV1"
  8. body = {
  9. "videoId": "21006075",
  10. "title": "各位退休的同学,请听!"
  11. }
  12. a = time.time()
  13. header = {
  14. "Content-Type": "application/json",
  15. }
  16. response = requests.post(url, json=body, headers=header, timeout=600)
  17. b = time.time()
  18. print(b - a)
  19. print(response.text)
  20. print(json.dumps(response.json(), ensure_ascii=False, indent=4))