Closed ArthurKun21 closed 1 year ago
I'm encountering this issue too. It's probably due to Youtube's recent UI changes. A workaround for this is to extract the videoid from the youtube channel /live
link
For example with curl
and grep
:
videoId=$(curl -s https://www.youtube.com/c/"$channelid"/live| grep -o -E '\{"videoId":"[a-z0-9A-Z_-]{11}' | head -1)
videoId=${videoId:12:11}
Yes it it is because of YouTube UI's changes. Other libraries, like pytube, also have the same problem currently. Fortunately, there are some PRs with fixes, like https://github.com/pytube/pytube/pull/1409
Would one of you like to make those changes here and submit a PR?
What about adding support for /live
urls and then just use that to get the livestream for when a channel url is entered instead of parsing the channel page?
Basic information
Describe the bug
User cannot be found
while doing the youtube get_user_videosCommand/Code used
Otherwise, if using the python module, provide the following:
channel_id = "UC_vMYWcDjmfdpH6r4TTn1MQ"
youtube = YouTubeChatDownloader() video_ids = youtube.get_user_videos( channel_id=channel_id, )
for video_id in video_ids: print(f"{video_id}")
chat_downloader.errors.UserNotFound: Unable to find user: "https://www.youtube.com/channel/UC_vMYWcDjmfdpH6r4TTn1MQ"