Open Inge1234567890 opened 1 year ago
Python >= 3.9
Same problem on Python 3.10
show me the error
for Python < 3.9
add : from typing import List, Dict
change : list[Download] to List[Download] list[DownloadAsync] to List[DownloadAsync] dict[str, str] to Dict[str, str] etc...
I´am trying your code to get videoinfo in pycharm. tiktok-downloader is the newest version with pip install git+https://github.com/krypton-byte/tiktok-downloader like in our tutorial.
That´s my code in a task.
in pycharm i get this syntax error.
Traceback:
File "C:\Users\xxx\AppData\Local\Programs\Python\Python38\lib\site-packages\tiktok_downloader__init__.py", line 1, in
from .snaptik import snaptik, Snaptik
File "C:\Users\xxx\AppData\Local\Programs\Python\Python38\lib\site-packages\tiktok_downloader\snaptik.py", line 12, in
class Snaptik(Session):
File "C:\Users\xxx\AppData\Local\Programs\Python\Python38\lib\site-packages\tiktok_downloader\snaptik.py", line 31, in Snaptik
def get_media(self) -> list[Download]:
TypeError: 'type' object is not subscriptable