Skip to content

Commit 8404f86

Browse files
authored
Merge pull request #4 from vabe44/from-video-ids-cli-fix
Fix KeyError for missing 'url' in yt_dlp entry when fetching by video_ids
2 parents 85cbcbc + e1aae9d commit 8404f86

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ytfetcher/_youtube_dl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def _to_snippets(self, entries: list[dict]) -> list[DLSnippet]:
6666
video_id=entry["id"],
6767
title=entry["title"],
6868
description=entry["description"],
69-
url=entry["url"] or f"https://youtube.com/watch?v={entry.get('id')}",
69+
url=entry.get("url") or f"https://youtube.com/watch?v={entry.get('id')}",
7070
duration=entry["duration"],
7171
view_count=entry["view_count"],
7272
thumbnails=entry["thumbnails"],

0 commit comments

Comments
 (0)