-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IndexError: list index out of range #15
Comments
I don't know if you solved this yet, but you can use Tikmate instead; it works for me.
notice the url now it's a parameter of get_media. |
Thanks for the help. |
same to me |
As practice shows, some services stop working from time to time. And this library provides a convenient enumeration of all services. You can use it something like this: from tiktok_downloader import services, InvalidUrl
def downloader(url):
name = 'Video_name.mp4'
for service in services.values():
try:
media = service(url)
except InvalidUrl as e: # InvaldUrl exception sometimes occurs even with correct URLs.
print(e)
if media:
media[0].download(name)
break
else:
print(f'InvalidUrl: {url}') |
Video loading does not work. I get an error:
tiktok_downloader.snaptik(url).get_media()[0].download()
Traceback (most recent call last):
File "C:\Users\Николай\Desktop\BOT_tg\test.py", line 17, in
tiktok_downloader.snaptik(url).get_media()[0]
IndexError: list index out of range
HELP!!!
The text was updated successfully, but these errors were encountered: