I'm trying to use the library TikTokApi to download TikTok data but when I call any method, it throws:
AttributeError: 'TikTokApi' object has no attribute 'width'
Here is an example of the code I'm running:
from TikTokApi import TikTokApi
api = TikTokApi.get_instance(use_selenium=True)
n_videos = 100
username = 'washingtonpost'
user_videos = api.byUsername(username, count=n_videos)
Same happens if I try this one https://github.com/davidteather/TikTok-Api/blob/master/examples/getAUsersVideos.py
I have the same problem. As David said, this error means that python-playwright or selenium is not launching correctly. What I did is
api = TikTokApi.get_instance(use_selenium=True, executablePath="/path/to/chromedriver")