tor4kichi / Hohoema

Windows10向けニコニコ動画プレイヤー
GNU General Public License v3.0
77 stars 10 forks source link

ニコニコ再開(8/5)への対応 #968

Open tor4kichi opened 3 months ago

tor4kichi commented 3 months ago

公式アナウンス https://blog.nicovideo.jp/niconews/225330.html

対応方針

機能別の対応について

アカウントのログイン・ログアウト

TODO

ニコニコ動画

TODO

ニコニコ生放送

TODO

フォロー新着(旧 ニコレポ)

TODO

ニコニコミュニティ(廃止)

消すだけなのでそう大変さはなさそう。先んじてNiconicoTookitからCommunity関係の削除作業を進めておく。

tor4kichi commented 2 months ago

データ取得が視聴ページHTMLからAPI直取得に変更

https://www.nicovideo.jp/watch/{VideoId}?responseType=json

以下は非ログイン(ゲスト)状態での取得例です。 長いので折りたたみ表示にしてます。

レスポンス例:通常の動画 ```json: { "meta": { "status": 200, "code": "HTTP_200" }, "data": { "metadata": { "title": "【MMD】ベジ様で『うそつき』 - ニコニコ動画", "linkTags": [ { "rel": "shortcut icon", "href": "https://resource.video.nimg.jp/web/images/favicon/favicon.ico", "attrs": [] }, { "rel": "icon", "href": "https://resource.video.nimg.jp/web/images/favicon/32.png", "attrs": { "type": "image/png", "sizes": "32x32" } }, { "rel": "icon", "href": "https://resource.video.nimg.jp/web/images/favicon/48.png", "attrs": { "type": "image/png", "sizes": "48x48" } }, { "rel": "icon", "href": "https://resource.video.nimg.jp/web/images/favicon/96.png", "attrs": { "type": "image/png", "sizes": "96x96" } }, { "rel": "icon", "href": "https://resource.video.nimg.jp/web/images/favicon/144.png", "attrs": { "type": "image/png", "sizes": "144x144" } }, { "rel": "preconnect", "href": "https://resource.video.nimg.jp", "attrs": [] }, { "rel": "preconnect", "href": "https://nvapi.nicovideo.jp", "attrs": [] }, { "rel": "preconnect", "href": "https://ads.nicovideo.jp/", "attrs": [] }, { "rel": "preconnect", "href": "https://www.googletagmanager.com", "attrs": [] }, { "rel": "preload", "href": "https://res.ads.nicovideo.jp/assets/js/ads2.js?ref=video", "attrs": { "as": "script" } }, { "rel": "alternate", "href": "https://sp.nicovideo.jp/watch/sm43888010", "attrs": { "media": "only screen and (max-width: 640px)", "class": "Alternate" } }, { "rel": "alternate", "href": "https://embed.nicovideo.jp/watch/sm43888010", "attrs": { "class": "Alternate" } }, { "rel": "canonical", "href": "https://www.nicovideo.jp/watch/sm43888010", "attrs": { "class": "Canonical" } }, { "rel": "preconnect", "href": "https://public.nvcomment.nicovideo.jp", "attrs": [] }, { "rel": "preconnect", "href": "https://delivery.domand.nicovideo.jp", "attrs": [] } ], "metaTags": [ { "name": "copyright", "content": "© DWANGO Co., Ltd." }, { "name": "msapplication-task", "content": "name=ニコニコ動画; action-uri=https://www.nicovideo.jp/; icon-uri=https://resource.video.nimg.jp/web/images/favicon/favicon.ico" }, { "property": "fb:app_id", "content": "378853695459932" }, { "name": "keywords", "content": "mikumikudance,ドラゴンボールMMD" }, { "name": "description", "content": "【MMD】ベジ様で『うそつき』 再開心の底からおめでとう&ありがとうございます!!!!!!!ここは間違いなく人生最愛のサイト..." }, { "name": "thumbnail", "content": "https://img.cdn.nimg.jp/s/nicovideo/thumbnails/43888010/43888010.88969701.original/r1280x720l?key=13e2c1a72761fc0b5665fab0c847bf824a134504b0e01df9f5266fc0586fa07a" }, { "property": "og:title", "content": "【MMD】ベジ様で『うそつき』" }, { "property": "og:description", "content": "【MMD】ベジ様で『うそつき』 再開心の底からおめでとう&ありがとうございます!!!!!!!ここは間違いなく人生最愛のサイト..." }, { "property": "og:type", "content": "video.other" }, { "property": "og:video", "content": "https://embed.nicovideo.jp/watch/sm43888010?autoplay=1" }, { "property": "og:video:url", "content": "https://embed.nicovideo.jp/watch/sm43888010?autoplay=1" }, { "property": "og:video:secure_url", "content": "https://embed.nicovideo.jp/watch/sm43888010?autoplay=1" }, { "property": "og:video:type", "content": "video/mp4" }, { "property": "og:video:width", "content": "640" }, { "property": "og:video:height", "content": "360" }, { "property": "og:video:tag", "content": "mikumikudance" }, { "property": "og:video:tag", "content": "ドラゴンボールMMD" }, { "property": "og:site_name", "content": "ニコニコ動画" }, { "property": "og:url", "content": "https://www.nicovideo.jp/watch/sm43888010" }, { "property": "og:image", "content": "https://img.cdn.nimg.jp/s/nicovideo/thumbnails/43888010/43888010.88969701.original/r1280x720l?key=13e2c1a72761fc0b5665fab0c847bf824a134504b0e01df9f5266fc0586fa07a" }, { "property": "og:locale", "content": "ja_JP" }, { "property": "video:duration", "content": "219" }, { "property": "video:release_date", "content": "2024-08-05T15:18+0900" }, { "name": "twitter:card", "content": "summary_large_image" }, { "name": "twitter:image", "content": "https://img.cdn.nimg.jp/s/nicovideo/thumbnails/43888010/43888010.88969701.original/r1280x720l?key=13e2c1a72761fc0b5665fab0c847bf824a134504b0e01df9f5266fc0586fa07a" }, { "name": "twitter:site", "content": "@nico_nico_info" }, { "name": "twitter:title", "content": "【MMD】ベジ様で『うそつき』" }, { "name": "twitter:description", "content": "再開心の底からおめでとう&ありがとうございます!!!!!!!ここは間違いなく人生最愛のサイト!!..." }, { "name": "twitter:app:country", "content": "jp" }, { "name": "twitter:app:name:iphone", "content": "ニコニコ動画" }, { "name": "twitter:app:id:iphone", "content": "307764057" }, { "name": "twitter:app:url:iphone", "content": "nicovideo://sm43888010" }, { "name": "twitter:app:name:googleplay", "content": "niconico" }, { "name": "twitter:app:id:googleplay", "content": "jp.nicovideo.android" }, { "name": "twitter:app:url:googleplay", "content": "nico://watch/sm43888010" }, { "property": "al:ios:url", "content": "nico://sm43888010?utm_source=facebook&utm_medium=video_player&utm_content=sm43888010&utm_campaign=facebook_app_links" }, { "property": "al:ios:app_store_id", "content": "307764057" }, { "property": "al:ios:app_name", "content": "ニコニコ動画" }, { "property": "al:android:url", "content": "https://www.nicovideo.jp/watch/sm43888010?utm_source=facebook&utm_medium=video_player&utm_content=sm43888010&utm_campaign=facebook_app_links" }, { "property": "al:android:app_name", "content": "ニコニコ動画" }, { "property": "al:android:package", "content": "jp.nicovideo.android" }, { "property": "al:web:url", "content": "nico://sm43888010?utm_source=facebook&utm_medium=video_player&utm_content=sm43888010&utm_campaign=facebook_app_links" }, { "property": "al:web:url", "content": "https://www.nicovideo.jp/watch/sm43888010" }, { "property": "al:web:should_fallback", "content": "true" } ], "jsonLds": [ { "@context": "http://schema.org", "@type": "VideoObject", "@id": "https://www.nicovideo.jp/watch/sm43888010", "name": "【MMD】ベジ様で『うそつき』", "description": "再開心の底からおめでとう&ありがとうございます!!!!!!!ここは間違いなく人生最愛のサイト!!!!", "caption": "再開心の底からおめでとう&ありがとうございます!!!!!!!ここは間違いなく人生最愛のサイト!!!!", "url": "https://www.nicovideo.jp/watch/sm43888010", "duration": "PT219S", "uploadDate": "2024-08-05T15:18:03+09:00", "embedUrl": "https://embed.nicovideo.jp/watch/sm43888010?autoplay=1", "interactionStatistic": [ { "@type": "InteractionCounter", "interactionType": "http://schema.org/WatchAction", "userInteractionCount": 7 }, { "@type": "InteractionCounter", "interactionType": "http://schema.org/WantAction", "userInteractionCount": 0 } ], "thumbnail": [ { "@type": "ImageObject", "url": "https://img.cdn.nimg.jp/s/nicovideo/thumbnails/43888010/43888010.88969701.original/r1280x720l?key=13e2c1a72761fc0b5665fab0c847bf824a134504b0e01df9f5266fc0586fa07a" }, { "@type": "ImageObject", "url": "https://nicovideo.cdn.nimg.jp/thumbnails/43888010/43888010.88969701.L", "width": 360, "height": 270 }, { "@type": "ImageObject", "url": "https://nicovideo.cdn.nimg.jp/thumbnails/43888010/43888010.88969701.M" }, { "@type": "ImageObject", "url": "https://nicovideo.cdn.nimg.jp/thumbnails/43888010/43888010.88969701", "width": 130, "height": 100 } ], "thumbnailUrl": [ "https://img.cdn.nimg.jp/s/nicovideo/thumbnails/43888010/43888010.88969701.original/r1280x720l?key=13e2c1a72761fc0b5665fab0c847bf824a134504b0e01df9f5266fc0586fa07a", "https://nicovideo.cdn.nimg.jp/thumbnails/43888010/43888010.88969701.L", "https://nicovideo.cdn.nimg.jp/thumbnails/43888010/43888010.88969701.M", "https://nicovideo.cdn.nimg.jp/thumbnails/43888010/43888010.88969701" ], "requiresSubscription": false, "isAccessibleForFree": true, "commentCount": 0, "keywords": "mikumikudance,ドラゴンボールMMD", "playerType": "HTML5", "provider": { "@type": "Organization", "name": "niconico" }, "author": { "@type": "Person", "name": "みいみ", "description": "DBのMMD動画を作っています。観るのはいろいろ。
発信するものすべてが腐・夢妄想と同じ生産ラインで作られています


ツイッターあります 生存確認とかに。(@mimika1717_DBKV)

万が一、Twitterがダメになってたらこっちで生存確認を。
タイッツー (@mimika1717)

アイコンはフリーのものをお借りしています。", "url": "https://www.nicovideo.jp/user/52605239" } }, { "@context": "http://schema.org", "@type": "WebSite", "name": "niconico", "url": "https://www.nicovideo.jp/" }, { "@context": "http://schema.org", "@type": "BreadcrumbList", "itemListElement": [ { "@type": "ListItem", "position": 1, "item": { "@id": "https://www.nicovideo.jp/video_top", "name": "ニコニコ動画" } }, { "@type": "ListItem", "position": 2, "item": { "@id": "https://www.nicovideo.jp/tag/mikumikudance", "name": "mikumikudance" } } ] } ] }, "googleTagManager": { "niconico": { "user": { "login_status": "not_login" }, "content": { "player_type": "er", "genre": "未設定", "content_type": "user" } }, "channel": null }, "response": { "ads": null, "category": null, "channel": null, "client": { "nicosid": "1672718598.87345287", "watchId": "sm43888010", "watchTrackId": "pfxyzcgxTx_1722840474393" }, "comment": { "server": { "url": "" }, "keys": { "userKey": "" }, "layers": [ { "index": 0, "isTranslucent": false, "threadIds": [ { "id": 1722838688, "fork": 1, "forkLabel": "owner" } ] }, { "index": 1, "isTranslucent": false, "threadIds": [ { "id": 1722838688, "fork": 0, "forkLabel": "main" }, { "id": 1722838688, "fork": 2, "forkLabel": "easy" } ] } ], "threads": [ { "id": 1722838688, "fork": 1, "forkLabel": "owner", "videoId": "sm43888010", "isActive": true, "isDefaultPostTarget": false, "isEasyCommentPostTarget": false, "isLeafRequired": false, "isOwnerThread": true, "isThreadkeyRequired": false, "threadkey": null, "is184Forced": false, "hasNicoscript": true, "label": "owner", "postkeyStatus": 0, "server": "" }, { "id": 1722838688, "fork": 0, "forkLabel": "main", "videoId": "sm43888010", "isActive": true, "isDefaultPostTarget": true, "isEasyCommentPostTarget": false, "isLeafRequired": true, "isOwnerThread": false, "isThreadkeyRequired": false, "threadkey": null, "is184Forced": false, "hasNicoscript": false, "label": "default", "postkeyStatus": 0, "server": "" }, { "id": 1722838688, "fork": 2, "forkLabel": "easy", "videoId": "sm43888010", "isActive": true, "isDefaultPostTarget": false, "isEasyCommentPostTarget": true, "isLeafRequired": true, "isOwnerThread": false, "isThreadkeyRequired": false, "threadkey": null, "is184Forced": false, "hasNicoscript": false, "label": "easy", "postkeyStatus": 0, "server": "" } ], "ng": { "ngScore": { "isDisabled": false }, "channel": [], "owner": [], "viewer": null }, "isAttentionRequired": false, "nvComment": { "threadKey": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJqdGkiOiI2NmIwNzU5YWE5NWU3IiwiZXhwIjoxNzIyODQwODAyLCJ0eXAiOiJUaHJlYWQtS2V5IiwidGlkcyI6WyIxNzIyODM4Njg4Il0sImYxODRzIjpbXX0.B9Xcmv2urm8Fkog-1sCThx0klR-JRuXHFwIeCab_WdwCSPWEMikT--tsfe4s1R713tKb4dBR6fWTczcVwT88Qw", "server": "https://public.nvcomment.nicovideo.jp", "params": { "targets": [ { "id": "1722838688", "fork": "owner" }, { "id": "1722838688", "fork": "main" }, { "id": "1722838688", "fork": "easy" } ], "language": "ja-jp" } } }, "community": null, "easyComment": { "phrases": [ { "text": "うぽつ", "nicodic": { "title": "うぽつ", "viewTitle": "うぽつ", "summary": "うぽつとは、うp乙のことで、うpは『アップロード』の略で、乙は『お疲れ様です』の略という意味。語源はうpと漢字の乙をローマ字で打つと「うぽつ」(up otu→u po tu)になることから。\n類義語に", "link": "https://dic.nicovideo.jp/a/%E3%81%86%E3%81%BD%E3%81%A4" } }, { "text": "www", "nicodic": { "title": "www", "viewTitle": "www", "summary": "wwwとは\n World Wide Web(ワールドワイドウェブ)\n ASIAN KUNG-FU GENERATIONの4thフルアルバム『ワールド ワールド ワールド』の省略表記\n QuinRose", "link": "https://dic.nicovideo.jp/a/www" } }, { "text": "すき", "nicodic": { "title": "すき", "viewTitle": "すき", "summary": "もしかして? → 好き\nひょっとして? → 鋤\nもしかるすと? → すき(絵師)\n概要\n隙ありっ! これで全部だと思うたか!?\n関連静画\n関連項目\nすすきの\n自動リンクされていない記事の一覧", "link": "https://dic.nicovideo.jp/a/%E3%81%99%E3%81%8D" } }, { "text": "ここすき", "nicodic": { "title": "ここすき", "viewTitle": "ここすき", "summary": "発祥\nアイマスMAD「もっとすいみんぶそく」が発祥である\n普及\nニコニコ動画での公式アニメ配信以降、他のアニメのOPで「ここすき」というコメントが度々見受けられていたが、\n「花咲くいろは」のOPでの弾", "link": "https://dic.nicovideo.jp/a/%E3%81%93%E3%81%93%E3%81%99%E3%81%8D" } }, { "text": "!?", "nicodic": { "title": "!?", "viewTitle": "!?", "summary": "概要!?\n!?とは\"強烈\"かつ\"理解不能\"な驚きを示す約物(記号)である…!?\n専門用語では「感嘆符疑問符」という名前である。投げやりじゃねえか!? 略すると「感嘆修辞疑問符」という長ったらしい上によ", "link": "https://dic.nicovideo.jp/a/%21%3F" } }, { "text": "おつ", "nicodic": { "title": "おつ", "viewTitle": "おつ", "summary": "乙とは、以下のことを表す。\n 乙(おつ、きのと) - 十干の第2位。五行は木、陰陽は陰。草花を象徴し、協調・社交・和合を意味する。\n 乙(おつ) - 甲で始まる順位の第2位。「乙種」「甲乙つけがたい」", "link": "https://dic.nicovideo.jp/a/%E3%81%8A%E3%81%A4" } }, { "text": "88888888", "nicodic": { "title": "88888888", "viewTitle": "88888888", "summary": "8は整数のひとつ。7の次、9の前。\n概要\n酸素(O)の原子番号。\n横に倒すと∞になってしまうので注意。8からずいぶん離れてしまう。\n「八」は末広がりの形をしているため、縁起の良い数とされる。\nニコニコ", "link": "https://dic.nicovideo.jp/a/88888888" } } ] }, "external": { "commons": { "hasContentTree": true }, "ichiba": { "isEnabled": true } }, "genre": { "key": "none", "label": "未設定", "isImmoral": false, "isDisabled": false, "isNotSet": true }, "marquee": { "isDisabled": false, "tagRelatedLead": null }, "media": { "domand": { "videos": [ { "id": "video-h264-1080p", "isAvailable": false, "label": "1080p", "bitRate": 4043045, "width": 1920, "height": 1080, "qualityLevel": 4, "recommendedHighestAudioQualityLevel": 1 }, { "id": "video-h264-720p", "isAvailable": true, "label": "720p", "bitRate": 2018265, "width": 1280, "height": 720, "qualityLevel": 3, "recommendedHighestAudioQualityLevel": 1 }, { "id": "video-h264-480p", "isAvailable": true, "label": "480p", "bitRate": 1616099, "width": 854, "height": 480, "qualityLevel": 2, "recommendedHighestAudioQualityLevel": 1 }, { "id": "video-h264-360p", "isAvailable": true, "label": "360p", "bitRate": 606248, "width": 640, "height": 360, "qualityLevel": 1, "recommendedHighestAudioQualityLevel": 1 }, { "id": "video-h264-144p", "isAvailable": true, "label": "144p", "bitRate": 154376, "width": 256, "height": 144, "qualityLevel": 0, "recommendedHighestAudioQualityLevel": 1 } ], "audios": [ { "id": "audio-aac-192kbps", "isAvailable": true, "bitRate": 228215, "samplingRate": 44100, "integratedLoudness": -6.716815, "truePeak": 2.108752, "qualityLevel": 1, "loudnessCollection": [ { "type": "video", "value": 0.3853370338004793 }, { "type": "pureAdPreroll", "value": 0.7079457843841379 }, { "type": "houseAdPreroll", "value": 0.7079457843841379 }, { "type": "networkAdPreroll", "value": 0.7079457843841379 }, { "type": "pureAdMidroll", "value": 0.7079457843841379 }, { "type": "houseAdMidroll", "value": 0.7079457843841379 }, { "type": "networkAdMidroll", "value": 0.7079457843841379 }, { "type": "pureAdPostroll", "value": 0.7079457843841379 }, { "type": "houseAdPostroll", "value": 0.7079457843841379 }, { "type": "networkAdPostroll", "value": 0.7079457843841379 }, { "type": "nicoadVideoIntroduce", "value": 0.8912509381337456 }, { "type": "nicoadBillboard", "value": 1 }, { "type": "marquee", "value": 1 } ] }, { "id": "audio-aac-64kbps", "isAvailable": true, "bitRate": 68408, "samplingRate": 44100, "integratedLoudness": -6.716815, "truePeak": 2.108752, "qualityLevel": 0, "loudnessCollection": [ { "type": "video", "value": 0.3853370338004793 }, { "type": "pureAdPreroll", "value": 0.7079457843841379 }, { "type": "houseAdPreroll", "value": 0.7079457843841379 }, { "type": "networkAdPreroll", "value": 0.7079457843841379 }, { "type": "pureAdMidroll", "value": 0.7079457843841379 }, { "type": "houseAdMidroll", "value": 0.7079457843841379 }, { "type": "networkAdMidroll", "value": 0.7079457843841379 }, { "type": "pureAdPostroll", "value": 0.7079457843841379 }, { "type": "houseAdPostroll", "value": 0.7079457843841379 }, { "type": "networkAdPostroll", "value": 0.7079457843841379 }, { "type": "nicoadVideoIntroduce", "value": 0.8912509381337456 }, { "type": "nicoadBillboard", "value": 1 }, { "type": "marquee", "value": 1 } ] } ], "isStoryboardAvailable": false, "accessRightKey": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJqdGkiOiI2NmIwNzU5YWFhYzY5IiwiZXhwIjoxNzIyODQxMDc0LCJ0eXAiOiJBY2Nlc3MtUmlnaHQtS2V5IiwidmlkIjoic200Mzg4ODAxMCIsInJpZCI6Im5pY292aWRlby1zbTQzODg4MDEwIiwiZmlkIjo2LCJ1aWQiOiI2LXBmeHl6Y2d4VHhfMTcyMjg0MDQ3NDM5MyIsImQiOjIxOSwidiI6WyJ2aWRlby1oMjY0LTcyMHAiLCJ2aWRlby1oMjY0LTQ4MHAiLCJ2aWRlby1oMjY0LTM2MHAiLCJ2aWRlby1oMjY0LTE0NHAiXSwiYSI6WyJhdWRpby1hYWMtMTkya2JwcyIsImF1ZGlvLWFhYy02NGticHMiXSwicyI6ZmFsc2UsInNoIjpmYWxzZX0.vikhYpwxPyyb7Xxnc72KUc1jBzh9Zbkt7c6Eq3dvpofqbK-TzFxvy1fAfdJnkGAz5wAjgCluGuNKX4z9UzcF8Q" }, "delivery": null, "deliveryLegacy": null }, "okReason": "PURELY", "owner": { "id": 52605239, "nickname": "みいみ", "iconUrl": "https://secure-dcdn.cdn.nimg.jp/nicoaccount/usericon/5260/52605239.jpg?1460455293", "channel": null, "live": null, "isVideosPublic": true, "isMylistsPublic": true, "videoLiveNotice": null, "viewer": null }, "payment": { "video": { "isPpv": false, "isAdmission": false, "isContinuationBenefit": false, "isPremium": false, "watchableUserType": "all", "commentableUserType": "all", "billingType": "free" }, "preview": { "ppv": { "isEnabled": false }, "admission": { "isEnabled": false }, "continuationBenefit": { "isEnabled": false }, "premium": { "isEnabled": false } } }, "pcWatchPage": { "tagRelatedBanner": null, "videoEnd": { "bannerIn": null, "overlay": null }, "showOwnerMenu": false, "showOwnerThreadCoEditingLink": false, "showMymemoryEditingLink": false }, "player": { "initialPlayback": null, "comment": { "isDefaultInvisible": false }, "layerMode": 0 }, "ppv": null, "ranking": { "genre": null, "popularTag": [] }, "series": null, "smartphone": null, "system": { "serverTime": "2024-08-05T15:47:54+09:00", "isPeakTime": false, "isStellaAlive": false }, "tag": { "items": [ { "name": "mikumikudance", "isCategory": false, "isCategoryCandidate": false, "isNicodicArticleExists": true, "isLocked": true }, { "name": "ドラゴンボールMMD", "isCategory": false, "isCategoryCandidate": false, "isNicodicArticleExists": true, "isLocked": true } ], "hasR18Tag": false, "isPublishedNicoscript": false, "edit": { "isEditable": false, "uneditableReason": "NEED_LOGIN", "editKey": null }, "viewer": null }, "video": { "id": "sm43888010", "title": "【MMD】ベジ様で『うそつき』", "description": "再開心の底からおめでとう&ありがとうございます!!!!!!!
ここは間違いなく人生最愛のサイト!!!!!帰ってきてくれて超うれしい!!!!!

ここが閉まっててMMDの様々な配布先にアクセスできず飢えに飢えていたとき、Re仮で出会ったこの曲を人生最愛の推しに踊っていただきました

お借りしたものは動画最後とコンテンツツリーに。
タイッツーできました。生存確認にぜひ。(@mimika1717)

Twitterもよろしく( @mimika1717_DBKV)

", "count": { "view": 6, "comment": 0, "mylist": 0, "like": 0 }, "duration": 219, "thumbnail": { "url": "https://nicovideo.cdn.nimg.jp/thumbnails/43888010/43888010.88969701", "middleUrl": "https://nicovideo.cdn.nimg.jp/thumbnails/43888010/43888010.88969701.M", "largeUrl": "https://nicovideo.cdn.nimg.jp/thumbnails/43888010/43888010.88969701.L", "player": "https://img.cdn.nimg.jp/s/nicovideo/thumbnails/43888010/43888010.88969701.original/a960x540l?key=8c60b8d2aa1b166ff798622dda2d287c1e7327d3a652eea3ef9c24cd58f5eb7d", "ogp": "https://img.cdn.nimg.jp/s/nicovideo/thumbnails/43888010/43888010.88969701.original/r1280x720l?key=13e2c1a72761fc0b5665fab0c847bf824a134504b0e01df9f5266fc0586fa07a" }, "rating": { "isAdult": false }, "registeredAt": "2024-08-05T15:18:03+09:00", "isPrivate": false, "isDeleted": false, "isNoBanner": false, "isAuthenticationRequired": false, "isEmbedPlayerAllowed": false, "isGiftAllowed": false, "viewer": null, "watchableUserTypeForPayment": "all", "commentableUserTypeForPayment": "all", "9d091f87": false }, "videoAds": { "additionalParams": { "videoId": "sm43888010", "videoDuration": 219, "isAdultRatingNG": false, "isAuthenticationRequired": false, "isR18": false, "nicosid": "1672718598.87345287", "lang": "ja-jp", "watchTrackId": "pfxyzcgxTx_1722840474393" }, "items": [ { "type": "preroll", "timingMs": null, "additionalParams": { "linearType": "preroll", "adIdx": 0, "skipType": 1, "skippableType": 1, "pod": 1 } }, { "type": "postroll", "timingMs": null, "additionalParams": { "linearType": "postroll", "adIdx": 0, "skipType": 1, "skippableType": 1, "pod": 2 } } ], "reason": "non_premium_user_ads" }, "videoLive": null, "viewer": null, "waku": { "information": { "title": "新しい動画視聴ページのリリースと今後について", "url": "https://blog.nicovideo.jp/niconews/225240.html" }, "bgImages": [], "addContents": null, "addVideo": null, "tagRelatedBanner": null, "tagRelatedMarquee": null } } } } ```
レスポンス例:非公開動画 ```json { "meta": { "status": 400, "code": "FORBIDDEN" }, "data": { "metadata": { "title": "ニコニコ動画", "linkTags": [ { "rel": "shortcut icon", "href": "https://resource.video.nimg.jp/web/images/favicon/favicon.ico", "attrs": [] }, { "rel": "icon", "href": "https://resource.video.nimg.jp/web/images/favicon/32.png", "attrs": { "type": "image/png", "sizes": "32x32" } }, { "rel": "icon", "href": "https://resource.video.nimg.jp/web/images/favicon/48.png", "attrs": { "type": "image/png", "sizes": "48x48" } }, { "rel": "icon", "href": "https://resource.video.nimg.jp/web/images/favicon/96.png", "attrs": { "type": "image/png", "sizes": "96x96" } }, { "rel": "icon", "href": "https://resource.video.nimg.jp/web/images/favicon/144.png", "attrs": { "type": "image/png", "sizes": "144x144" } }, { "rel": "preconnect", "href": "https://resource.video.nimg.jp", "attrs": [] }, { "rel": "preconnect", "href": "https://nvapi.nicovideo.jp", "attrs": [] }, { "rel": "preconnect", "href": "https://ads.nicovideo.jp/", "attrs": [] }, { "rel": "preconnect", "href": "https://www.googletagmanager.com", "attrs": [] }, { "rel": "preload", "href": "https://res.ads.nicovideo.jp/assets/js/ads2.js?ref=video", "attrs": { "as": "script" } } ], "metaTags": [ { "name": "copyright", "content": "© DWANGO Co., Ltd." }, { "name": "msapplication-task", "content": "name=ニコニコ動画; action-uri=https://www.nicovideo.jp/; icon-uri=https://resource.video.nimg.jp/web/images/favicon/favicon.ico" }, { "property": "fb:app_id", "content": "378853695459932" } ], "jsonLds": [] }, "response": { "isCustomError": true, "statusCode": 400, "errorCode": "FORBIDDEN", "reasonCode": "HIDDEN_VIDEO", "deletedMessage": null, "communityLink": null, "publishScheduledAt": null, "data": null } } } ```
tor4kichi commented 2 months ago

動画視聴までの大まかな流れは変わっていません。最初の動画視聴データ取得部分だけ前のコメントの通り変化してます。

以前までの手順は以下から確認できます https://github.com/tor4kichi/Hohoema/issues/961#issuecomment-1805308392

2024/8/5 以降における視聴までの手順は次の通りです

  1. https://www.nicovideo.jp/watch/{VideoId}?responseType=json からレスポンスされるjsonをパース
  2. jsonの media.domand.videos および media.domand.audios から任意の動画と音声のクオリティを選択
  3. https://nvapi.nicovideo.jp/v1/watch/{{video.id}}/access-rights/hls?actionTrackId={{videoAds.additionalParams.watchTrackId}} にPOST 3.1 リクエストヘッダーに以下を追加 3.1.1 キー:X-Access-Right-Key 値:{{media.domand.accessRightKey}} 3.1.2 キー:X-Frontend-Version 値:0 3.1.3 キー:X-Frontend-Id 値:6 3.1.4 キー:X-Request-With 値:https://www.nicovideo.jp 3.2 リクエストコンテンツに以下を設定 3.2.1 json {"outputs":[["video-h264-144p","audio-aac-128kbps"]]} 3.2.2 画質・音質の値は media.domand.videos 等の id を指定します 3.3 actionTrackIdは必須です。無い場合は失敗します
  4. レスポンスされたjson の data.contentUrl を用いてメディア再生を行う

(3)のレスポンス例

{
  "meta": {
    "status": 201
  },
  "data": {
    "contentUrl": "https://delivery.domand.nicovideo.jp/hls/654b11200d7d2ef695f075ba/playlists/variants/1e1d32ffbbec3289.m3u8",
    "createTime": "2023-11-10T17:00:28+09:00",
    "expireTime": "2023-11-11T17:00:28+09:00"
  }
}
tor4kichi commented 2 months ago