Skip to content

Commit

Permalink
feat: added channel url to output
Browse files Browse the repository at this point in the history
  • Loading branch information
Morriz committed May 20, 2024
1 parent 1712fe4 commit 483eaa7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions api/tools/youtube.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class Video(BaseModel):
title: str
short_desc: Union[str, None] = None
channel: str
channel_url: Union[str, None] = None
duration: Union[str, int]
views: Union[str, int]
publish_time: Union[str, int]
Expand Down Expand Up @@ -151,6 +152,7 @@ def search_youtube_channel(
return []
results = _parse_html_list(html, max_results)
for video in results:
video.channel_url = channel_url
if get_descriptions:
video_info = _get_video_info(video.id)
video.long_desc = video_info.get("long_desc")
Expand Down

0 comments on commit 483eaa7

Please sign in to comment.