S
S
ShutovYa2021-07-29 12:57:24
Python
ShutovYa, 2021-07-29 12:57:24

How to solve the error?

Hello, there is such a code for downloading video from tik tok. but when importing, it gives me the error below. who worked with TikTokApi, how to solve?

print("Input the TikTok URL")
url = input()
from TikTokApi import TikTokApi
api = TikTokApi()
video_bytes = api.get_Video_No_Watermark(url)
with open("tiktok.mp4", 'wb') as output:
    output.write(video_bytes)


from TikTokApi.tiktok import TikTokApi
File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/TikTokApi/tiktok.py", line 7, in
from playwright.sync_api import sync_playwright
ImportError: cannot import name 'sync_playwright' from 'playwright.sync_api' (/data/data/com.termux/files/usr/lib/python3.9/site-packages/playwright/sync_api.py)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maga Izdaga, 2021-07-29
@MagaVTanke

https://stackoverflow.com/questions/51068439/impor...
There is a specified solution, you need to write two lines on the command line. Try.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question