>>524
javascript:(function(){if(/\.nicovideo\.jp\/api\/getflv\/(\w+)/.test(document.URL)){var%20t=(new%20Date).getTime(),xhr=new%20XMLHttpRequest;
xhr.withCredentials=!0;xhr.open
("GET","https://www.nicovideo.jp/api/watch/v3/";+RegExp.$1+"?_frontendId=6&_frontendVersion=0&actionTrackId=AAAAAAAAAA_"+t+"&skips=harmful&noSideEffect=false&t="+t);
xhr.onreadystatechange=function(){if(xhr.readyState===XMLHttpRequest.DONE){var%20i=function(n){xhr.open("POST",n.urls[0].url+"?_format=json");
xhr.setRequestHeader("Content-Type","application/json");
xhr.onreadystatechange=function(){if(xhr.readyState===XMLHttpRequest.DONE){var%20t=JSON.parse(xhr.responseText);
xhr.status>=200&&xhr.status<400?(document.body.innerHTML=
"<p>下の動画かリンクから右クリックか長押しで保存出来ます。<br>ダウンロード中はスリープせずにこのページを前面に開いたままにしとかないとダウンロードに失敗します。
<br>動画再生しながら保存するとスリープ防止になって良いかもしれません
<\/p><p><a%20href=\""+t.data.session.content_uri+"\"%20target=\"_blank\">"+RegExp.$1+".mp4<\/a><\/p><p><video%20controls%20src=\""+t.data.session.content_uri+"\"%20width=\"100%\"><\/video><\/p>",
setInterval(function(){xhr.open("POST",n.urls[0].url+"/"+t.data.session.id+"?_format=json&_method=PUT");xhr.setRequestHeader("Content-Type","application/json");
xhr.onreadystatechange=function(){};
xhr.send(JSON.stringify(t.data))},Math.round(n.heartbeatLifetime/3))):document.body.innerHTML="<p>"+t.meta.message+"<\/p>"}};
xhr.send(JSON.stringify({session:{recipe_id:n.recipeId,content_id:n.contentId,content_type:"movie",content_src_id_sets:[{content_src_ids:[{src_id_to_mux:{video_src_ids:n.videos,audio_src_ids:n.audios}}]}],timing_constraint:
"unlimited",keep_method:{heartbeat:{lifetime:n.heartbeatLifetime}},protocol:{name:"http",parameters:
{http_parameters:{parameters:
{http_output_download_parameters:
{use_well_known_port:"yes",use_ssl:"yes",transfer_preset:""}}}}},
content_uri:"",session_operation_auth:{session_operation_auth_by_signature:
{token:n.token,signature:n.signature}},
content_auth:{auth_type:"ht2",
content_key_timeout:n.contentKeyTimeout,service_id:"nicovideo",service_user_id:n.serviceUserId},client_info:
{player_id:n.playerId},priority:n.priority}}))},n=JSON.parse(xhr.responseText);
xhr.status>=200&&xhr.status<400?n.data.media.delivery?i(n.data.media.delivery.movie.session):
document.body.innerHTML="<p>"+n.data.okReason+"<\/p>":(
xhr.open("GET","https://www.nicovideo.jp/api/watch/v3_guest/";+RegExp.$1+"?_frontendId=6&_frontendVersion=0&actionTrackId=AAAAAAAAAA_"+t+"&skips=harmful&noSideEffect=false&t="+t),
xhr.onreadystatechange=function(){if(xhr.readyState===XMLHttpRequest.DONE){var%20n=JSON.parse(xhr.responseText);xhr.status>=200&&
xhr.status<400?n.data.media.delivery?i(n.data.media.delivery.movie.session):
document.body.innerHTML="<p>"+n.data.okReason+"<\/p>":
document.body.innerHTML="<p>"+n.meta.errorCode+"<\/p>"}},xhr.send())}};xhr.send()}})();