avilash / TikTokAPI-Python

TikTok API Python Wrapper
http://avilashkumar.com/TikTokAPI-Python/
MIT License
443 stars 114 forks source link

downloadVideoByIdNoWatermark downloads empty file #9

Open khazidhea opened 3 years ago

khazidhea commented 3 years ago

The "vid:" part is gone from the watermarked videofile. Is there another way to get hiddent video_id?

avilash commented 3 years ago

Ill see if I can find any other way to get that hidden video_id

naumanmunir commented 3 years ago

Hi, any update to this?

eos1209 commented 2 years ago

Not currently used

bhargavsonagara commented 2 years ago

@avilash In the TikTokApi, the noWatermark part code, I am not able to find the vid: part for other videos. It shows pos = -1. So, will you please help me with this please?

bhargavsonagara commented 2 years ago

i found a solution for download video without watermark :--> ex url = https://www.tiktok.com/@blood.chan/video/7109888542192536875

url = self.request.headers['Url'] if "@" in url and "/video/" in url: id = url.split("/video/")[1].split("?")[0] api = 'https://toolav.herokuapp.com/id/?video_id='+id r = requests.get(api, headers = {'user-agent': 'okhttp'})

response = r.json()

aweme_id = response.get('item', '').get('aweme_id', '') video_url_no_wm = f"https://api.tiktokv.com/aweme/v1/play/?video_id{aweme_id}&vr_type=0&is_play_url=1&source=PackSourceEnum_PUBLISH&media_type=4" video_data_no_wm = get_req_content(video_url_no_wm, params=None, headers=self.headers) with open(f'media/without{id}.mp4', 'wb') as f: f.write(video_data_no_wm)