123456789101112131415161718192021222324 |
- import json
- import requests
- def request_for_info(video_id):
- """
- 请求数据
- :param video_id:
- :return:
- """
- url = "https://longvideoapi.piaoquantv.com/longvideoapi/openapi/video/batchSelectVideoInfo"
- data = {
- "videoIdList": [video_id]
- }
- header = {
- "Content-Type": "application/json",
- }
- response = requests.post(url, headers=header, data=json.dumps(data))
- return response.json()
- r = request_for_info("20964481")
- print(json.dumps(r, ensure_ascii=False, indent=4))
|