matchArticle_dev.py 434 B

1234567891011121314151617181920212223
  1. """
  2. @author: luojunhui
  3. """
  4. import json
  5. import time
  6. import requests
  7. url = "http://localhost:8888/matchArticle"
  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(json.dumps(response.json(), ensure_ascii=False, indent=4))