12345678910111213141516171819202122 |
- """
- @author: luojunhui
- """
- import json
- import time
- import requests
- url = "http://localhost:8888/singleVideo"
- body = {
- "videoId": 21059419
- }
- a = time.time()
- header = {
- "Content-Type": "application/json",
- }
- response = requests.post(url, json=body, headers=header, timeout=600)
- b = time.time()
- print(b - a)
- print(json.dumps(response.json(), ensure_ascii=False, indent=4))
|