Closed dj2ball closed 10 months ago
The for_username
is not for the new username for the channel. And This username
is in the old youtube version and for a youtube user,
You can get more information at doc
I assume there is no API for the "new" username yet?
As of now, tthe field custom_url
(at the channel snippet part) will return this new username data, but there is no place to use this username to fetch other data.
I am struggling to use the for_username argument to request a client channel list. Example code below:
from pyyoutube import Client import json
Youtube Data API V3
API_KEY = "XXX"
client = Client(api_key = API_KEY)
response = client.channels.list(channel_id="UCMo28ATCDU0Kn9dpilAF79Q", return_json=True)
response = client.channels.list(for_username="@TheOverlap", return_json=True)
print(json.dumps(response))
RESPONSE: {"kind": "youtube#channelListResponse", "etag": "RuuXzTIr0OoDqI4S0RU6n4FqKEM", "pageInfo": {"totalResults": 0, "resultsPerPage": 5}}