Fix type in request_channel_id url

This commit is contained in:
BreadTube 2026-01-09 20:37:43 +09:00
commit 1eddcb686c
2 changed files with 21 additions and 18 deletions

View file

@ -73,7 +73,7 @@ class YoutubeManager:
def request_channel_id(self, channel_name: str, request_timeout: float) -> str:
url = ('https://www.googleapis.com/youtube/v3/channels?part=snippet'
f'&forHandle%40={channel_name}&key={self._api_key}')
f'&forHandle=%40{channel_name}&key={self._api_key}')
self._logger.debug('YoutubeManager: request channel id for channel %s', channel_name)
_, info = self._request(url=url, request_timeout=request_timeout)
return info['items'][0]['id']