headers = {
'user-agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.106 Safari/537.36',
'accept':'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9'
}
data = {'access_token':', 'v': '5.130', 'owner_id': '637578408', 'file_size': os.stat("videos/"+tiktoks[a]["video"]["id"]+".mp4").st_size}
rp =
requests.post('
https://api.vk.com/method/shortVideo.create', data=data, headers=headers)
upload_url = rp.json()['response']['upload_url']
my_file = open("videos/"+tiktoks[a]["video"]["id"]+".mp4", 'rb')
up = {'video':('6902784884750814465.mp4', my_file, "multipart/form-data")}
resp =
requests.post(upload_url, files=up)