12345678910111213141516171819202122232425262728293031323334 |
- """
- @author: luojunhui
- """
- import json
- import time
- import requests
- """
- cate: video_return, video_view, video_rov
- """
- url = "http://47.99.132.47:8888/videos"
- # url = "http://localhost:8888/videos"
- body = {
- "cate": "video_return",
- "start_date": "2024-07-10",
- "end_date": "2024-07-11",
- "topN": 500
- }
- 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(len(response.json()['data']))
- for i in response.json()['data']:
- # print(i)
- print(i['title'])
- # print(i['video_url'])
- # print("\n")
|