Open hueyyeng opened 2 years ago
Follow up on this, I can't properly parsed the processed embedded data as it seems like it doesn't load the Confirmation Code page (likely the authentication function didn't detect the redirection).
What I noticed from the function logic is that it is looking for the following before it creates a new thread to handle the websocket connection:
websocket_url = embedded_data['site']['relive']['webSocketUrl']
best_quality = embedded_data['program']['stream']['maxQuality']
One can get the value above easily by login into Niconico and clear the Confirmation Code with your browser of choice:
webSocketUrl
and you should see something like this: wss://a.live2.nicovideo.jp/unama/wsapi/v2/watch/RNGIDHERE/timeshift?audience_token=YOURLONGTOKENHERE
best_quality
, you can use super_high
since you need to have an active sub to Niconico to use it anyway.niconico.py
script (refer to screenshot) and run youtube_dl scriptsorry for the late response, I don't look at this repo much; I'll work on adding updated nicolive support to yt-dlp in the future. nice art btw
@nolanlum Is it okay if I modify your nicolive code and add it to yt-dlp?
@nolanlum Is it okay if I modify your nicolive code and add it to yt-dlp?
sure! if you can adapt it to work in yt-dlp that's very welcome. thanks for keeping it up to date, let me know if there's anything I can do to help.
@horahoradev If you need someone to QA, you can ping me as I'm currently subbing to Niconico for the timeshift feature.
Checklist
Verbose log
Description
I've been using this forked of youtube-dl for the NiconicoLive support and been using it to archive drawing livestream although my last usage was late Dec 2021.
The issue is that Niconico seems to change the backend server side to dispatch a Confirmation Code whenever one try to login to the site and this includes this tool. With the Confirmation Code checks in place, youtube-dl will error out at
youtube_dl.utils.ExtractorError: Unable to find stream media URL. Is the stream private or unavailable?
If in a browser, after inputting the Confirmation Code (which is a 6 digits code), you're login into the site and can watch the timeshift broadcast (basically the reason why I sub to Niconico for the archived broadcast).
I'm unsure how the login process works but I can take a look at the code and see if I can find a way to prompt the user to key in the Confirmation Code and proceed with the download. Just to report the issue here first if others are facing the same issue for NiconicoLive or Niconico in general.