AlexAplin / nndownload

Download and process links from Niconico (nicovideo.jp)
MIT License
213 stars 28 forks source link

Download comments for premium videos. #142

Closed Lywzc closed 5 months ago

Lywzc commented 5 months ago

Is it possible? I can access them on the website. The video itself won't play but comments are correctly retrieved as long as you are using Japanese IP.

This would be tremendously helpful if I missed the free time window for a video.

AlexAplin commented 5 months ago

Have you tried using --skip-media? I worked to support this exact use case previously: https://github.com/AlexAplin/nndownload/issues/102#issuecomment-927214324

Lywzc commented 5 months ago

Yes I tried. The following error occured. ParameterExtractionException: Failed to collect video paramters

AlexAplin commented 5 months ago

Please provide an example video and if possible please also provide the source of the page as an attachment when viewed in your browser (right click > View Page Source).

Lywzc commented 5 months ago

https://www.nicovideo.jp/watch/so43193316 Source.txt

AlexAplin commented 5 months ago

The only thing I can guess is that nndownload's traffic is not being correctly tunneled through your VPN, because that source from your browser shows the params data is there (js-initial-watch-data). The Failed to collect video paramters is only thrown when that is not present and it's not detected as region locked, but the region lock check probably needs to be updated because it doesn't look like what I see currently.

I would recommend trying to capture the document request inside nndownload (e.g. add print(document) after L1018) so we can tell what it's actually seeing. My own VPN (Mullvad) doesn't seem to fool the region lock these days.

Lywzc commented 5 months ago

Source.txt Here it is.

AlexAplin commented 5 months ago

この動画は有料です。
視聴するにはログインした後、動画を購入してください。

It's definitely not the same error, and the params is missing here. Are you using -g? If you're providing a login, is your account premium?

Lywzc commented 5 months ago

I thought I can access the comments without logging in. Seems that this is only true if the video is not premium. Premium videos require logging in to access the comments. No premium account is needed however.

I think this issue is solved.

AlexAplin commented 5 months ago

Yeah that appears to be the case, thanks!