add Rappid api Tiktok script

This commit is contained in:
tsuky_chen
2023-12-20 11:34:00 +08:00
parent 05d3b5863d
commit 8faba1c8ee
5 changed files with 913 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
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)