Handle videoQualities being null

This commit is contained in:
Ivan Habunek 2024-08-30 08:06:31 +02:00
parent 707b2da934
commit 4db4285d9a
No known key found for this signature in database
GPG Key ID: 01DB3DD0D824504C

View File

@ -98,5 +98,8 @@ def clip_info(clip: Clip):
click.echo()
click.echo("Download links:")
for q in clip["videoQualities"]:
click.echo(f"{bold(q['quality'])} [{q['frameRate']} fps] {q['sourceURL']}")
if clip["videoQualities"]:
for q in clip["videoQualities"]:
click.echo(f"{bold(q['quality'])} [{q['frameRate']} fps] {q['sourceURL']}")
else:
click.echo("No download URLs found")