Repository: yt-dlp/yt-dlp

Issue:
[Broken] Niconico
<!--

######################################################################
  WARNING!
  IGNORING THE FOLLOWING TEMPLATE WILL RESULT IN ISSUE CLOSED AS INCOMPLETE
######################################################################

-->


## Checklist

<!--
Carefully read and work through this check list in order to prevent the most common mistakes and misuse of yt-dlp:
- First of, make sure you are using the latest version of yt-dlp. Run `yt-dlp --version` and ensure your version is 2021.03.15. If it's not, see https://github.com/yt-dlp/yt-dlp on how to update. Issues with outdated version will be REJECTED.
- Make sure that all provided video/audio/playlist URLs (if any) are alive and playable in a browser.
- Make sure that all URLs and arguments with special characters are properly quoted or escaped as explained in https://github.com/yt-dlp/yt-dlp.
- Search the bugtracker for similar issues: https://github.com/yt-dlp/yt-dlp. DO NOT post duplicates.
- Finally, put x into all relevant boxes like this [x] (Dont forget to delete the empty space)
-->

- [x] I'm reporting a broken site support
- [x] I've verified that I'm running yt-dlp version **2021.03.15**
- [x] I've checked that all provided URLs are alive and playable in a browser
- [x] I've checked that all URLs and arguments with special characters are properly quoted or escaped
- [x] I've searched the bugtracker for similar issues including closed ones


## Verbose log

<!--
Provide the complete verbose output of yt-dlp that clearly demonstrates the problem.
Add the `-v` flag to your command line you run yt-dlp with (`yt-dlp -v <your command line>`), copy the WHOLE output and insert it below. It should look similar to this:
 [debug] System config: []
 [debug] User config: []
 [debug] Command-line args: [u'-v', u'http://www.youtube.com/watch?v=BaW_jenozKcj']
 [debug] Encodings: locale cp1251, fs mbcs, out cp866, pref cp1251
 [debug] yt-dlp version 2021.03.15
 [debug] Python version 2.7.11 - Windows-2003Server-5.2.3790-SP2
 [debug] exe versions: ffmpeg N-75573-g1d0487f, ffprobe N-75573-g1d0487f, rtmpdump 2.4
 [debug] Proxy map: {}
 <more lines>
-->

```
[debug] Command-line config: ['--list-formats', '--verbose', 'https://www.nicovideo.jp/watch/sm31589985']
[debug] Loading archive file None
[debug] Encodings: locale cp1252, fs utf-8, out utf-8, pref cp1252
[debug] yt-dlp version 2021.03.15
[debug] Python version 3.8.7 (CPython 64bit) - Windows-10-10.0.19041-SP0
[debug] exe versions: ffmpeg n4.3.1-29-g89daac5fe2, ffprobe n4.3.1-29-g89daac5fe2
[debug] Proxy map: {}
[niconico] sm31589985: Downloading webpage
[niconico] sm31589985: Downloading video info page
ERROR: The video can't downloaded.
Traceback (most recent call last):
  File "c:\users\cleo\appdata\local\programs\python\python38\lib\site-packages\yt_dlp\extractor\niconico.py", line 398, in _real_extract
    dmc_info = api_data['video']['dmcInfo']
KeyError: 'dmcInfo'
Traceback (most recent call last):
  File "c:\users\cleo\appdata\local\programs\python\python38\lib\site-packages\yt_dlp\extractor\niconico.py", line 398, in _real_extract
    dmc_info = api_data['video']['dmcInfo']
KeyError: 'dmcInfo'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\users\cleo\appdata\local\programs\python\python38\lib\site-packages\yt_dlp\YoutubeDL.py", line 1024, in wrapper
    return func(self, *args, **kwargs)
  File "c:\users\cleo\appdata\local\programs\python\python38\lib\site-packages\yt_dlp\YoutubeDL.py", line 1045, in __extract_info
    ie_result = ie.extract(url)
  File "c:\users\cleo\appdata\local\programs\python\python38\lib\site-packages\yt_dlp\extractor\common.py", line 554, in extract
    ie_result = self._real_extract(url)
  File "c:\users\cleo\appdata\local\programs\python\python38\lib\site-packages\yt_dlp\extractor\niconico.py", line 400, in _real_extract
    raise ExtractorError('The video can\'t downloaded.',
yt_dlp.utils.ExtractorError: The video can't downloaded.

```
<!--
Do not remove the above ```
-->


## Description

<!--
Provide an explanation of your issue in an arbitrary form. Provide any additional information, suggested solution and as much context and examples as possible.
If work on your issue requires account credentials please provide them or explain how one can obtain them.
-->

This just happened recently. I tried doing the clear cache method but it still doesn't work. I also did use login credentials but same error happens (even on other youtube-dl forks) 



Discussion:
Related: https://github.com/animelover1984/youtube-dl/issues/29
Btw I forgot to mention that it also now asks for login credentials. Just last week I didn't need any login credentials to download and check formats.
> Btw I forgot to mention that it also now asks for login credentials. Just last week I didn't need any login credentials to download and check formats.

Can you give an example? Seems to be working for me on my branch, without providing credentials.
As my opinion, we should remove support for FLV formats, since Niconico will no longer provide Flash version.

This is why user experience error message saying to set credential.

P.S. A fix from @animelover1984 worked well. Thanks a lot.
https://github.com/nao20010128nao/ytdl-patched/commit/171a9c33e96216f0fd6d51afea4a5f1c257bea50
 > Can you give an example? Seems to be working for me on my branch, without providing credentials.

I just realized that error prompt was from yt-dlc oops! I'm still unable to download. I still kept getting the error.

`[niconico] sm31589985: Downloading webpage`
`[niconico] sm31589985: Downloading video info page`
`ERROR: The video can't downloaded.`
I've pushed a partial fix based on https://github.com/animelover1984/youtube-dl/commit/b5eff52dd9ed5565672ea1694b38c9296db3fade

* SMILE formats still dont work and many of the improvements from #49 is therefore broken
* I haven't tested if all metadata is extracted correctly.
* Code also needs refactoring.
Maybe @tsukumijima or @kurumigi may be interested in fixing it?
https://blog.nicovideo.jp/niconews/149209.html (Japanese)
As you can see in this article, on March 15th, the "ruins" function of niconico's deleted video was terminated. This is part of the steps to update the comment server in the future.
This organized the structure of JSON data in the watch page. The data itself does not appear to have changed, but the location of the keys where the data resides seems to have changed significantly.
I would like to cooperate, but unfortunately I don't have time to tackle this issue right now.
The fix does not seem to work for videos which require credentials:

```
[debug] Command-line config: ['-u', 'PRIVATE', '-p', 'PRIVATE', '--verbose', '--ignore-config', 'https://www.nicovideo.jp/watch/so37994933']
[debug] Loading archive file None
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] yt-dlp version 2021.03.15 
[debug] Python version 3.7.3 (CPython 64bit) - Linux-4.19.0-14-amd64-x86_64-with-debian-10.8
[debug] exe versions: ffmpeg 4.1.6-1, ffprobe 4.1.6-1, phantomjs 2.1.1, rtmpdump 2.4
[debug] Proxy map: {}
[niconico] Logging in
[niconico] so37994933: Downloading webpage
[niconico] so37994933: Downloading video info page
WARNING: [niconico] Unable to obtain smile video information
[debug] Sort order given by user: 
[debug] Formats sorted by: hasvid, ie_pref, lang, quality, res, fps, vcodec:vp9.2(10), acodec, filesize, fs_approx, tbr, vbr, abr, asr, proto, vext, aext, hasaud, source, id
ERROR: Unable to extract video title; please report this issue on https://github.com/yt-dlp/yt-dlp . Make sure you are using the latest version; see  https://github.com/yt-dlp/yt-dlp  on how to update. Be sure to call yt-dlp with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "/home/username/.local/lib/python3.7/site-packages/yt_dlp/YoutubeDL.py", line 1024, in wrapper
    return func(self, *args, **kwargs)
  File "/home/username/.local/lib/python3.7/site-packages/yt_dlp/YoutubeDL.py", line 1045, in __extract_info
    ie_result = ie.extract(url)
  File "/home/username/.local/lib/python3.7/site-packages/yt_dlp/extractor/common.py", line 554, in extract
    ie_result = self._real_extract(url)
  File "/home/username/.local/lib/python3.7/site-packages/yt_dlp/extractor/niconico.py", line 501, in _real_extract
    webpage, 'video title')
  File "/home/username/.local/lib/python3.7/site-packages/yt_dlp/extractor/common.py", line 1050, in _html_search_regex
    res = self._search_regex(pattern, string, name, default, fatal, flags, group)
  File "/home/username/.local/lib/python3.7/site-packages/yt_dlp/extractor/common.py", line 1041, in _search_regex
    raise RegexNotFoundError('Unable to extract %s' % _name)
yt_dlp.utils.RegexNotFoundError: Unable to extract video title; please report this issue on https://github.com/yt-dlp/yt-dlp . Make sure you are using the latest version; see  https://github.com/yt-dlp/yt-dlp  on how to update. Be sure to call yt-dlp with the --verbose flag and include its complete output.

```

Using the same command (edit: without logging in) with a normal video works.

EDIT: using https://github.com/animelover1984/youtube-dl works, but yt-dlp does not for paid videos.
@CXwudi Oh I see. I never bother logging in for videos which don't require it so I didn't think of that.

> I've pushed a partial fix based on [animelover1984/youtube-dl@b5eff52](https://github.com/animelover1984/youtube-dl/commit/b5eff52dd9ed5565672ea1694b38c9296db3fade)
> 
> * SMILE formats still dont work and many of the improvements from #49 is therefore broken
> * I haven't tested if all metadata is extracted correctly.
> * Code also needs refactoring.
>   Maybe @tsukumijima or @kurumigi may be interested in fixing it?

I'll also be taking a better look at my extractor issues when I have a chance. I made some quick fixes in the interest of restoring basic functionality, but I don't think it's ideal.
related: https://github.com/ytdl-org/youtube-dl/issues/28484
> The fix does not seem to work for videos which require credentials:
> 
> ```
> [debug] Command-line config: ['-u', 'PRIVATE', '-p', 'PRIVATE', '--verbose', '--ignore-config', 'https://www.nicovideo.jp/watch/so37994933']
> [debug] Loading archive file None
> [debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
> [debug] yt-dlp version 2021.03.15 
> [debug] Python version 3.7.3 (CPython 64bit) - Linux-4.19.0-14-amd64-x86_64-with-debian-10.8
> [debug] exe versions: ffmpeg 4.1.6-1, ffprobe 4.1.6-1, phantomjs 2.1.1, rtmpdump 2.4
> [debug] Proxy map: {}
> [niconico] Logging in
> [niconico] so37994933: Downloading webpage
> [niconico] so37994933: Downloading video info page
> WARNING: [niconico] Unable to obtain smile video information
> [debug] Sort order given by user: 
> [debug] Formats sorted by: hasvid, ie_pref, lang, quality, res, fps, vcodec:vp9.2(10), acodec, filesize, fs_approx, tbr, vbr, abr, asr, proto, vext, aext, hasaud, source, id
> ERROR: Unable to extract video title; please report this issue on https://github.com/yt-dlp/yt-dlp . Make sure you are using the latest version; see  https://github.com/yt-dlp/yt-dlp  on how to update. Be sure to call yt-dlp with the --verbose flag and include its complete output.
> Traceback (most recent call last):
>   File "/home/username/.local/lib/python3.7/site-packages/yt_dlp/YoutubeDL.py", line 1024, in wrapper
>     return func(self, *args, **kwargs)
>   File "/home/username/.local/lib/python3.7/site-packages/yt_dlp/YoutubeDL.py", line 1045, in __extract_info
>     ie_result = ie.extract(url)
>   File "/home/username/.local/lib/python3.7/site-packages/yt_dlp/extractor/common.py", line 554, in extract
>     ie_result = self._real_extract(url)
>   File "/home/username/.local/lib/python3.7/site-packages/yt_dlp/extractor/niconico.py", line 501, in _real_extract
>     webpage, 'video title')
>   File "/home/username/.local/lib/python3.7/site-packages/yt_dlp/extractor/common.py", line 1050, in _html_search_regex
>     res = self._search_regex(pattern, string, name, default, fatal, flags, group)
>   File "/home/username/.local/lib/python3.7/site-packages/yt_dlp/extractor/common.py", line 1041, in _search_regex
>     raise RegexNotFoundError('Unable to extract %s' % _name)
> yt_dlp.utils.RegexNotFoundError: Unable to extract video title; please report this issue on https://github.com/yt-dlp/yt-dlp . Make sure you are using the latest version; see  https://github.com/yt-dlp/yt-dlp  on how to update. Be sure to call yt-dlp with the --verbose flag and include its complete output.
> ```
> 
> Using the same command with a normal video works.
> 
> EDIT: using https://github.com/animelover1984/youtube-dl works, but yt-dlp does not for paid videos.

Honestly, i tried it myself and accidently figure that the issue is simply just: login will break
```
[debug] Command-line config: ['-v', 'https://www.nicovideo.jp/watch/sm38140033', '--username', 'PRIVATE', '--password', 'PRIVATE']
[debug] Loading archive file None
[debug] Encodings: locale cp936, fs utf-8, out utf-8, pref cp936
[debug] yt-dlp version 2021.03.15 (source)
[debug] Plugin Extractors: ['SamplePlugin']
[debug] Git HEAD: 5c5fae6d2
[debug] Python version 3.8.2 (CPython 32bit) - Windows-10-10.0.18362-SP0
[debug] exe versions: none
[debug] Proxy map: {}
[niconico] Logging in
[niconico] sm38140033: Downloading webpage
[niconico] sm38140033: Downloading video info page
WARNING: [niconico] Unable to obtain smile video information
[debug] Sort order given by user:
[debug] Formats sorted by: hasvid, ie_pref, lang, quality, res, fps, vcodec:vp9.2(10), acodec, filesize, fs_approx, tbr, vbr, abr, asr, proto, vext, aext, hasaud, source, id
ERROR: Unable to extract video title; please report this issue on https://github.com/yt-dlp/yt-dlp . Make sure you are using the latest version; see  https://github.com/yt-dlp/yt-dlp  on how to update. Be sure to call yt-dlp with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "D:\11134\Videos\Vocaloid Coding POC\yt-dlp\yt_dlp\YoutubeDL.py", line 1025, in wrapper
    return func(self, *args, **kwargs)
  File "D:\11134\Videos\Vocaloid Coding POC\yt-dlp\yt_dlp\YoutubeDL.py", line 1046, in __extract_info
    ie_result = ie.extract(url)
  File "D:\11134\Videos\Vocaloid Coding POC\yt-dlp\yt_dlp\extractor\common.py", line 554, in extract
    ie_result = self._real_extract(url)
  File "D:\11134\Videos\Vocaloid Coding POC\yt-dlp\yt_dlp\extractor\niconico.py", line 499, in _real_extract
    title = self._html_search_regex(
  File "D:\11134\Videos\Vocaloid Coding POC\yt-dlp\yt_dlp\extractor\common.py", line 1050, in _html_search_regex
    res = self._search_regex(pattern, string, name, default, fatal, flags, group)
  File "D:\11134\Videos\Vocaloid Coding POC\yt-dlp\yt_dlp\extractor\common.py", line 1041, in _search_regex
    raise RegexNotFoundError('Unable to extract %s' % _name)
yt_dlp.utils.RegexNotFoundError: Unable to extract video title; please report this issue on https://github.com/yt-dlp/yt-dlp . Make sure you are using the latest version; see  https://github.com/yt-dlp/yt-dlp  on how to update. Be sure to call yt-dlp with the --verbose flag and include its complete output.
```
If I tried without login on the same link. 
```
PS D:\11134\Videos\Vocaloid Coding POC\yt-dlp>  python .\yt_dlp\__main__.py -v https://www.nicovideo.jp/watch/sm38140033
[debug] Command-line config: ['-v', 'https://www.nicovideo.jp/watch/sm38140033']
[debug] Loading archive file None
[debug] Encodings: locale cp936, fs utf-8, out utf-8, pref cp936
[debug] yt-dlp version 2021.03.15 (source)
[debug] Plugin Extractors: ['SamplePlugin']
[debug] Git HEAD: 5c5fae6d2
[debug] Python version 3.8.2 (CPython 32bit) - Windows-10-10.0.18362-SP0
[debug] exe versions: none
[debug] Proxy map: {}
[niconico] sm38140033: Downloading webpage
[niconico] sm38140033: Downloading video info page
WARNING: [niconico] Unable to obtain smile video information
[debug] Sort order given by user:
[debug] Formats sorted by: hasvid, ie_pref, lang, quality, res, fps, vcodec:vp9.2(10), acodec, filesize, fs_approx, tbr, vbr, abr, asr, proto, vext, aext, hasaud, source, id
[debug] Default format spec: best/bestvideo+bestaudio
[info] Downloading format(s) h264_360p-aac_64kbps
[debug] Invoking downloader on 'niconico_dmc:sm38140033/archive_h264_360p/archive_aac_64kbps'
[niconico_dmc] Downloading from DMC
[niconico] sm38140033: Downloading webpage
[niconico] sm38140033: Downloading JSON metadata
[niconico] sm38140033: Downloading JSON metadata for h264_360p-aac_64kbps
[niconico_dmc] Heartbeat with 60.0 second interval ...
[download] Destination: BeatSea「それはシャンデリーナ ‐ feat.鏡音リン」 [sm38140033].mp4
[download]  32.1% of 12.47MiB at 336.12KiB/s ETA 00:25
```
@rivke41levp656 @CXwudi Try using `--cookies`, not `--username --password`
@pukkandan same result for me, yt-dlp fails, other fork succeeds.
> @pukkandan same result for me, yt-dlp fails, other fork succeeds.

With cookies? ~~I don't have a niconico account to test/fix this unless someone is willing to DM me their account details~~
@rivke41levp656 confirmed same result 
```
python .\yt_dlp\__main__.py -v https://www.nicovideo.jp/watch/sm38140033 --cookie '.\nico cookies.txt'
[debug] Command-line config: ['-v', 'https://www.nicovideo.jp/watch/sm38140033', '--cookie', '.\\nico cookies.txt']
...
yt_dlp.utils.RegexNotFoundError: Unable to extract video title; please report this issue on https://github.com/yt-dlp/yt-dlp . Make sure you are using the latest version; see  https://github.com/yt-dlp/yt-dlp  on how to update. Be sure to call yt-dlp with the --verbose flag and include its complete output.
```
By the way, you just need an email to get a normal niconico account (https://account.nicovideo.jp/login?site=niconico). Only premium accounts are paid. But let me know if you need a premium ccount.
It seems that the title information of the form `<meta property="og:title" content="...">` is not available when (and only when) logged in. Maybe we have to get it separately without logging in.

If you do not need the title info, you can use the following patch as a workaround (which sets the title field to `NA`):
```
--- a/yt_dlp/extractor/niconico.py
+++ b/yt_dlp/extractor/niconico.py
@@ -496,9 +496,7 @@
         if not title:
             title = self._og_search_title(webpage, default=None)
         if not title:
-            title = self._html_search_regex(
-                r'<span[^>]+class="videoHeaderTitle"[^>]*>([^<]+)</span>',
-                webpage, 'video title')
+            title = "NA"
 
         watch_api_data_string = self._html_search_regex(
             r'<div[^>]+id="watchAPIDataContainer"[^>]+>([^<]+)</div>',
```
@xtkoba very thanks for this hint, I tried `title = get_video_info_web("title")` and it works now 
```
title = get_video_info_web('originalTitle') or get_video_info_web('title')
if not title:
    title = self._og_search_title(webpage, default=None)
if not title:
    title = self._html_search_regex(
        r'<span[^>]+class="videoHeaderTitle"[^>]*>([^<]+)</span>',
        webpage, 'video title')
```
@pukkandan would you mind confirming if this fix?
@CXwudi @xtkoba Was busy yesterday. I've pushed your patch
not work HLS+AES128

```
[debug] Command-line config: ['-v', '-u', 'PRIVATE', '-p', 'PRIVATE', 'https://www.nicovideo.jp/watch/so38016254']
[debug] Loading archive file None
[debug] Encodings: locale cp932, fs utf-8, out utf-8, pref cp932
[debug] yt-dlp version 2021.03.24.1 (source)
[debug] Plugin Extractors: ['SamplePlugin']
[debug] Python version 3.8.8 (CPython 64bit) - Windows-10-10.0.19041-SP0
[debug] exe versions: ffmpeg 3.2.4, ffprobe 3.2.4
[debug] Proxy map: {}
[niconico] Logging in
[niconico] so38016254: Downloading webpage
[niconico] so38016254: Downloading video info page
WARNING: [niconico] Unable to obtain smile video information
[debug] Sort order given by user:
[debug] Formats sorted by: hasvid, ie_pref, lang, quality, res, fps, vcodec:vp9.2(10), acodec, filesize, fs_approx, tbr, vbr, abr, asr, proto, vext, aext, hasaud, source, id
[debug] Default format spec: bestvideo*+bestaudio/best
[info] Downloading format(s) h264_720p-aac_192kbps
[debug] Invoking downloader on 'niconico_dmc:so38016254/archive_h264_720p/archive_aac_192kbps'
[niconico_dmc] Downloading from DMC
[niconico] so38016254: Downloading webpage
[niconico] so38016254: Downloading JSON metadata
[niconico] so38016254: Downloading JSON metadata for h264_720p-aac_192kbps
ERROR: Unable to download JSON metadata: HTTP Error 403: Forbidden (caused by <HTTPError 403: 'Forbidden'>); please report this issue on https://github.com/yt-dlp/yt-dlp . Make sure you are using the latest version; see https://github.com/yt-dlp/yt-dlp on how to update. Be sure to call yt-dlp with the --verbose flag and include its complete output.
File "C:\Users\betsu\Desktop\yt-dlp-master\yt_dlp\extractor\common.py", line 666, in _request_webpage
return self._downloader.urlopen(url_or_request)
File "C:\Users\betsu\Desktop\yt-dlp-master\yt_dlp\YoutubeDL.py", line 2822, in urlopen
return self._opener.open(req, timeout=self._socket_timeout)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2288.0_x64__qbz5n2kfra8p0\lib\urllib\request.py", line 531, in open
response = meth(req, response)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2288.0_x64__qbz5n2kfra8p0\lib\urllib\request.py", line 640, in http_response
response = self.parent.error(
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2288.0_x64__qbz5n2kfra8p0\lib\urllib\request.py", line 569, in error
return self._call_chain(*args)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2288.0_x64__qbz5n2kfra8p0\lib\urllib\request.py", line 502, in _call_chain
result = func(*args)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2288.0_x64__qbz5n2kfra8p0\lib\urllib\request.py", line 649, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
```
I can't open that link, it seems like we need a VPN to debug this issue.
@betsu0 Just wanna confirm, you don't have any issue watching it online, right?
For debuggers: you need a VPN via Japan.
Use of Vultr's Tokyo region is not suitable.

Huh, I tried deleting cookies, close my browsers, connect ExpressVPN to Japan, restart the browsers, and it still doesn't work for me. Now I am curious how can we access this video? 
@CXwudi I'm now trying to reverse it, and HLS downloading is now successful with non-encrypted video.
Can you please give me a clue to decode this m3u8 playlist?
https://gist.github.com/nao20010128nao/ec2db2ac52c350420a37b3bc3ccab0bf
 I successfully extracted this from  https://www.nicovideo.jp/watch/so38016254

https://github.com/nao20010128nao/ytdl-patched/tree/niconico-encrypted-hls
here is what I'm working on
@nao20010128nao Nice code change on your side. By looking at it, I realized that all `['dmcInfo']` (e.g. [this](https://github.com/yt-dlp/yt-dlp/blob/b23b9eefd9b5f5044103d5dfcab9b890522e2908/yt_dlp/extractor/niconico.py#L214) and [this](https://github.com/yt-dlp/yt-dlp/blob/b23b9eefd9b5f5044103d5dfcab9b890522e2908/yt_dlp/extractor/niconico.py#L232)) should be updated as it is the old schema no longer used. Maybe this can solve the issue on yt-dlp's side?
@CXwudi Yes. my version does not use `dmcInfo`, so it's possible.
I'm failing to decode ts files in m3u8 playlist.

@CXwudi How should I share my Internet connection with you?
@nao20010128nao It's already 12pm on my place now, but I have contacted you on discord, maybe we can check tmr
@CXwundi
I replied you in Discord with credential for proxy.
I am sorry, I am also failing to decode files in m3u8 playlist.......

Here is my [code fix](https://github.com/yt-dlp/yt-dlp/compare/master...CXwudi:niconico-fix-and-improve) and my [run log](https://gist.github.com/CXwudi/b1859cd449f5c2eff3e4e12608dcc4e9)

Maybe contributors from #49 can help? 
What is the output when using `--hls-prefer-native` @CXwudi ?
@pukkandan wired output video file, looks like the m3u8 list itself is saved as video file [log](https://gist.github.com/CXwudi/c45ca94c0e20a02affa781deb3210c6f)
Update based on discussion we had on discord

It is possible to download the actual `ts` fragments using https://github.com/pukkandan/yt-dlp-dev/tree/nico. However, it is not possible to decode it rn. It seems like the key that yt-dlp gets from the manifest is invalid for whatever reason
I think this will be helpful (Japanese): https://qiita.com/tor4kichi/items/91550a71119f3878bfba#comment-346de200d84c79876831
If it is not different from the old specification, you need to request "https://nvapi.nicovideo.jp/v1/2ab0cbaa/watch?t={tracking_id}" before accessing the encryption key. If you do not make a request or make a request without the required headers, a fake encryption key will be returned.

Resolving patch:
diff --git a/yt_dlp/extractor/niconico.py b/yt_dlp/extractor/niconico.py
--- a/yt_dlp/extractor/niconico.py
+++ b/yt_dlp/extractor/niconico.py
@@ -493,7 +493,8 @@ def get_video_info_xml(items):
 
         # Start extracting information
         title = (
-            get_video_info_web(['originalTitle', 'title'])
+            get_video_info_xml('title')  # prefer to get the untranslated original title
+            or get_video_info_web(['originalTitle', 'title'])
             or self._og_search_title(webpage, default=None)
             or self._html_search_regex(
                 r'<span[^>]+class="videoHeaderTitle"[^>]*>([^<]+)</span>',
@@ -507,7 +508,9 @@ def get_video_info_xml(items):
 
         thumbnail = (
             self._html_search_regex(r'<meta property="og:image" content="([^"]+)">', webpage, 'thumbnail data', default=None)
-            or get_video_info_web(['thumbnail_url', 'largeThumbnailURL', 'thumbnailURL'])
+            or try_get(  # choose highest from 720p to 240p
+                get_video_info_web('thumbnail'),
+                ['ogp', 'player', 'largeUrl', 'middleUrl', 'url'])
             or self._html_search_meta('image', webpage, 'thumbnail', default=None)
             or video_detail.get('thumbnail'))
 


Test patch: