add Rappid api Tiktok script
This commit is contained in:
17
resouce_collection/Tiktok/VS_code/get_vscode.py
Normal file
17
resouce_collection/Tiktok/VS_code/get_vscode.py
Normal 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)
|
||||
Reference in New Issue
Block a user