From 5b009a5afb570c23ec5633317d1d69c885e676ad Mon Sep 17 00:00:00 2001 From: naporitan Date: Wed, 22 May 2024 15:28:03 +0900 Subject: [PATCH] chore(api): Use channel from UI as API query parameter (#4562) --- api/core/tools/provider/builtin/youtube/tools/videos.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/core/tools/provider/builtin/youtube/tools/videos.py b/api/core/tools/provider/builtin/youtube/tools/videos.py index 86160dfa6c..7a9b9fce4a 100644 --- a/api/core/tools/provider/builtin/youtube/tools/videos.py +++ b/api/core/tools/provider/builtin/youtube/tools/videos.py @@ -36,7 +36,7 @@ class YoutubeVideosAnalyticsTool(BuiltinTool): youtube = build('youtube', 'v3', developerKey=self.runtime.credentials['google_api_key']) # try to get channel id - search_results = youtube.search().list(q='mrbeast', type='channel', order='relevance', part='id').execute() + search_results = youtube.search().list(q=channel, type='channel', order='relevance', part='id').execute() channel_id = search_results['items'][0]['id']['channelId'] start_date, end_date = time_range