streamlink / streamlink

Streamlink is a CLI utility which pipes video streams from various services into a video player
https://streamlink.github.io/
BSD 2-Clause "Simplified" License
9.96k stars 1.11k forks source link

plugins.nico: Login failed: unknown reason #4365

Closed nazhendenb closed 2 years ago

nazhendenb commented 2 years ago

Checklist

Streamlink version

Latest build from the master branch

Description

It needs a verify code to login to niconico recently. So I think the reason that streamlink can not login to niconico is verify code. In fact , My email recived a verify code shortly after starting streamlink

Debug log

streamlink --loglevel debug --hls-live-restart -o rica2.25.ts --niconico-email ***** --niconico-password ***** https://live.nicovideo.jp/watch/lv335638634 best
[cli][info] streamlink is running as root! Be careful!
[cli][debug] OS:         Linux-4.15.0-167-generic-x86_64-with-glibc2.27
[cli][debug] Python:     3.8.0
[cli][debug] Streamlink: 3.1.1
[cli][debug] Requests(2.27.1), Socks(1.7.1), Websocket(1.2.3)
[cli][debug] Arguments:
[cli][debug]  url=https://live.nicovideo.jp/watch/lv335638634
[cli][debug]  stream=['best']
[cli][debug]  --loglevel=debug
[cli][debug]  --output=rica2.25.ts
[cli][debug]  --hls-live-restart=True
[cli][debug]  --niconico-email=********
[cli][debug]  --niconico-password=********
[cli][info] Found matching plugin nicolive for URL https://live.nicovideo.jp/watch/lv335638634
[plugins.nicolive][info] Logging in via provided email and password
[plugins.nicolive][debug] Cookies: {'mfa_session': '67618323_F9vuG5gPOSILd4v0cQAuae0CvuLVjze2', 'nicosid': '1645798998.1968321482'}
[plugins.nicolive][warning] Login failed: unknown reason
[plugin.api.websocket][debug] Connecting to: wss://a.live2.nicovideo.jp/unama/wsapi/v2/watch/41057137984103?audience_token=41057137984103_anonymous-user-e5e2d90f-d8a2-4544-a955-d3b9bed4b9c5_1645885399_62c25f49aa24457bd8aa177689017bd896e60dc3&frontend_id=9
[plugins.nicolive][debug] Waiting for permit (for at most 6 seconds)...
[plugin.api.websocket][debug] Connected: wss://a.live2.nicovideo.jp/unama/wsapi/v2/watch/41057137984103?audience_token=41057137984103_anonymous-user-e5e2d90f-d8a2-4544-a955-d3b9bed4b9c5_1645885399_62c25f49aa24457bd8aa177689017bd896e60dc3&frontend_id=9
[plugins.nicolive][debug] Received: {"type":"serverTime","data":{"currentMs":"2022-02-25T23:23:20.299+09:00"}}
[plugins.nicolive][debug] Received: {"type":"seat","data":{"keepIntervalSec":30}}
[plugins.nicolive][debug] Received: {"type":"stream","data":{"uri":"https://vodedge709.dmc.nico/hlslive/ht2_nicolive/nicolive-production-pg41057137984103_320b67356d9b0745d930a7d03fca4647b94582226cc3ca9079e3f02b5bb10e8b/master.m3u8?ht2_nicolive=anonymous-user-e5e2d90f-d8a2-4544-a955-d3b9bed4b9c5.g8hvvuadcd_r7v6mw_wvt2dr3awce9","syncUri":"https://vodedge709.dmc.nico/hlslive/ht2_nicolive/nicolive-production-pg41057137984103_320b67356d9b0745d930a7d03fca4647b94582226cc3ca9079e3f02b5bb10e8b/stream_sync.json?ht2_nicolive=anonymous-user-e5e2d90f-d8a2-4544-a955-d3b9bed4b9c5.g8hvvuadcd_r7v6mw_wvt2dr3awce9","quality":"abr","availableQualities":["abr","super_high","high","normal","low","super_low","audio_high"],"protocol":"hls"}}
[utils.l10n][debug] Language code: en_US
[cli][info] Available streams: 350k (worst), 690k, 1800k, 3600k, 5400k (best)
[cli][info] Opening stream: 5400k (hls)
[cli][debug] Checking file output
[plugins.nicolive][debug] Stream opened, keeping websocket connection alive
[plugins.nicolive][debug] Received: {"type":"room","data":{"name":"アリーナ","messageServer":{"uri":"wss://msgd.live2.nicovideo.jp/websocket","type":"niwavided"},"threadId":"M.88pKG8bE1Vi4ZwGAxM0-Fg","isFirst":true,"waybackkey":"waybackkey","vposBaseTime":"2022-02-25T23:00:00+09:00"}}
[plugins.nicolive][debug] Received: {"type":"schedule","data":{"begin":"2022-02-25T23:00:00+09:00","end":"2022-02-26T00:30:00+09:00"}}
[plugins.nicolive][debug] Received: {"type":"akashic","data":{"playId":"51134488","contentUrl":"https://ak.cdn.nimg.jp/coe/contents/aufeiR7C/nicocas/4.0.0/content.json","logServerUrl":"wss://ap-msg39.coe.nicovideo.jp/4005/","status":"ready","token":"72d1a1b18e83cec96c45545401b4b09a332883cc44cc6a7d46afd443f33a10b4","playerId":"anonymous-user-e5e2d90f-d8a2-4544-a955-d3b9bed4b9c5"}}
[plugins.nicolive][debug] Received: {"type":"statistics","data":{"viewers":1799,"comments":1034,"adPoints":216300,"giftPoints":150}}
[stream.hls][debug] Reloading playlist
[cli][debug] Pre-buffering 8192 bytes
[stream.hls][debug] First Sequence: 2128; Last Sequence: 2130
[stream.hls][debug] Start offset: 0; Duration: None; Start Sequence: 2128; End Sequence: None
[stream.hls][debug] Adding segment 2128 to queue
[stream.hls][debug] Adding segment 2129 to queue
[stream.hls][debug] Adding segment 2130 to queue
[stream.hls][debug] Segment 2128 complete
[cli][debug] Writing stream to output
[stream.hls][debug] Segment 2129 complete
[stream.hls][debug] Segment 2130 complete
[stream.hls][debug] Reloading playlist
[stream.hls][debug] Adding segment 2131 to queue
[stream.hls][debug] Segment 2131 complete
[download][rica2.25.ts] Written 75.9 KB (2s @ 35.1 KB/s)                                                                                                                            [stream.hls][debug] Reloading playlist
[stream.hls][debug] Adding segment 2132 to queue
[stream.hls][debug] Segment 2132 complete
[download][rica2.25.ts] Written 98.5 KB (4s @ 22.8 KB/s)                                                                                                                            ^C[stream.segmented][debug] Closing worker thread
[stream.segmented][debug] Closing writer thread
[stream.segmented][debug] Closing writer thread
[plugin.api.websocket][debug] Closed: wss://a.live2.nicovideo.jp/unama/wsapi/v2/watch/41057137984103?audience_token=41057137984103_anonymous-user-e5e2d90f-d8a2-4544-a955-d3b9bed4b9c5_1645885399_62c25f49aa24457bd8aa177689017bd896e60dc3&frontend_id=9
[cli][info] Stream ended
Interrupted! Exiting...
[cli][info] Closing currently open stream...
nazhendenb commented 2 years ago

Thank you