davidteather / TikTok-Api

The Unofficial TikTok API Wrapper In Python
https://davidteather.github.io/TikTok-Api
MIT License
4.76k stars 962 forks source link

I want waterless video #19

Closed 5wcx closed 4 years ago

5wcx commented 4 years ago

http://vm.tiktok.com/jN55fJ/ i need no water video ,how to do?

issue-label-bot[bot] commented 4 years ago

Issue-Label Bot is automatically applying the label feature_request to this issue, with a confidence of 0.57. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

davidteather commented 4 years ago

Right now the api is broken

davidteather commented 4 years ago

Just released a new update that fixed the video function. You'll have download the latest chromedriver from Google, and include the .exe in your path.

You have to update your TikTokApi version by running

pip install TikTokApi

Then here's the code for the link you provided

from TikTokApi.tiktok import TikTokapi

api = TikTokapi("browsermob-proxy", headless=False)
f = api.get_Video_By_Url("https://www.tiktok.com/@mmjiepai/video/6712998958161087749", return_bytes=1)

with open('test.mp4', 'wb') as filthign:
    filthign.write(f)

This will write the video to test.mp4

RotemAkerman commented 4 years ago

@davidteather I've tried the code above (using the same link) but it just wrote the following JSON into test.mp4:

{"statusCode":200,"contentType":"application/json","content":""}

davidteather commented 4 years ago

@RotemAkerman Apparently it broke during one of the updates. Just uploaded a new PyPi package so just update TikTokApi using pip and it should now work.

Official release release on github will come in a few hours.

V2.3.3 works correctly with getting a video by url

RotemAkerman commented 4 years ago

@davidteather Thanks! This seems to work now, but video does include the watermark...

RotemAkerman commented 4 years ago

@davidteather BTW: How do I translate video link from http://vm.tiktok.com/jN55fJ/ -> https://www.tiktok.com/@mmjiepai/video/6712998958161087749

konman1989 commented 4 years ago

Google

Hi @davidteather , having issues running api.trending(10), it throws a 'selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH.' error.

The driver itself is in 'browsermob-proxy' dir. Is there a way to explicitly give it a path? Thanks