chore(api): Use channel from UI as API query parameter (#4562)

This commit is contained in:
naporitan 2024-05-22 15:28:03 +09:00 committed by GitHub
parent 3efb5fe7e2
commit 5b009a5afb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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