Files
sci-gui-agent-benchmark/resouce_collection/Tiktok/VS_code/get_vscode.py
2023-12-20 11:34:00 +08:00

18 lines
480 B
Python

import requests
import json
url = "https://tiktok-download-video1.p.rapidapi.com/feedSearch"
querystring = {"keywords":"VS code","count":"10","cursor":"0","region":"US","publish_time":"0","sort_type":"1"}
headers = {
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "tiktok-download-video1.p.rapidapi.com"
}
response = requests.get(url, headers=headers, params=querystring)
print(response.json())
with open("./record.json", "w") as f:
json.dump(response.json(), f)