]*?id\\s*=\\s*(\"|')?" + objRef.id + "\\1[^>]*>", "im" );
if ( !objReg.test( objRef.text ) ) return false;
var div = RegExp.lastMatch;
var next = RegExp.rightContext;
var objReg1 = /
]*)?>/ig;
var objReg2 = /<\/div\s*>/ig;
var close = 0;
var success = false;
while( objReg2.test( next ) ) {
var left = RegExp.leftContext;
var open = 0;
while ( objReg1.test( left ) ) {
if ( RegExp.$1.match( /\/$/ ) ) continue;
open++;
}
if ( open === close ) {
objRet.inner = left;
objRet.outer = div + left + "
";
success = true;
break;
}
close++;
}
return success;
}
function clsMsgBox(){
//WScript.Shell Popup
this.isOK = false;
this._objShell = null;
this._initialize = function (){
try{
this._objShell = new ActiveXObject( "WScript.Shell" );
this.isOK = true;
} catch( e ) {
this.isOK = false;
}
}
this._initialize();
this.MsgBox = function ( msg, title, btn ){
if ( btn == undefined ) btn = 1;
//btn=1の時ret: OK:1, キャンセル:2
if ( this.isOK )
return this._objShell.Popup( msg, 0, title, btn+64 );
}
}
/* 2013/11/15 */
/* getVideoUrl */
function setType( arrDat ) {
//arrDatは要素にobjを持ち、obj.domain:stringを持つ。
//typeをセット。getVideoUrlをセット。
for ( var i = 0; i < arrDat.length; i++ ) {
if ( arrDat[i].domain.match( /(.+\.)?videofun\.me$/ ) ) {
arrDat[i].type = "videofunme";
arrDat[i].getVideoUrl = getVideoUrl_FlowPlayer;
} else if ( arrDat[i].domain.match( /(.+\.)?video44\.net$/ ) ) {
arrDat[i].type = "video44net";
arrDat[i].getVideoUrl = getVideoUrl_video44net;
} else if ( arrDat[i].domain.match( /(.+\.)?novamov\.com$/ ) ) {
arrDat[i].type = "novamovcom";
arrDat[i].getVideoUrl = getVideoUrl_novamovcom;
} else if ( arrDat[i].domain.match( /(.+\.)?vidzur\.com$/ ) ) {
arrDat[i].type = "vidzurcom";
arrDat[i].getVideoUrl = getVideoUrl_FlowPlayer;
} else if ( arrDat[i].domain.match( /(.+\.)?videoweed\.es$/ ) ) {
arrDat[i].type = "videoweedes";
arrDat[i].getVideoUrl = getVideoUrl_videoweedes;
} else if ( arrDat[i].domain.match( /(.+\.)?yourupload\.com$/ ) ) {
arrDat[i].type = "youruploadcom";
arrDat[i].getVideoUrl = getVideoUrl_youruploadcom;
} else if ( arrDat[i].domain.match( /(.+\.)?videobug\.net$/ ) ) {
arrDat[i].type = "videobugnet";
arrDat[i].getVideoUrl = getVideoUrl_FlowPlayer;
} else if ( arrDat[i].domain.match( /(.+\.)?play44\.net$/ ) ) {
arrDat[i].type = "play44net";
arrDat[i].getVideoUrl = getVideoUrl_FlowPlayer;
} else if ( arrDat[i].domain.match( /(.+\.)?chia-anime\.com$/ ) ) {
arrDat[i].type = "chia-animecom";
arrDat[i].getVideoUrl = getVideoUrl_FlowPlayer;
} else if ( arrDat[i].domain.match( /(.+\.)?animepremium\.tv$/ ) ) {
arrDat[i].type = "animepremiumtv";
arrDat[i].getVideoUrl = getVideoUrl_FlowPlayer;
} else if ( arrDat[i].domain.match( /(.+\.)?auengine\.com$/ ) ) {
arrDat[i].type = "auenginecom";
arrDat[i].getVideoUrl = getVideoUrl_FlowPlayer;
} else if ( arrDat[i].domain.match( /(.+\.)?gogoanime\.com$/ ) ) {
arrDat[i].type = "gogoanimecom";
arrDat[i].getVideoUrl = getVideoUrl_FlowPlayer;
} else if ( arrDat[i].domain.match( /(.+\.)?mp4upload\.com$/ ) ) {
arrDat[i].type = "mp4uploadcom";
arrDat[i].getVideoUrl = getVideoUrl_mp4upload;
} else if ( arrDat[i].domain.match( /(.+\.)?animeget\.net$/ ) ) {
arrDat[i].type = "animegetnet";
arrDat[i].getVideoUrl = getVideoUrl_JWPlayer;
} else if ( arrDat[i].domain.match( /(.+\.)?putlocker\.com$/ ) ) {
arrDat[i].type = "putlockercom";
arrDat[i].getVideoUrl = getVideoUrl_putlocker;
} else if ( arrDat[i].domain.match( /(.+\.)?animedreaming\.tv$/ ) ) {
arrDat[i].type = "animedreaming(Veoh)";
arrDat[i].getVideoUrl = getVideoUrl_animedreamingtv;
} else if ( arrDat[i].domain.match( /(.+\.)?tinyvid\.net$/ ) ) {
arrDat[i].type = "tinyvidnet";
arrDat[i].getVideoUrl = getVideoUrl_FlowPlayer
} else if ( arrDat[i].domain.match( /(.+\.)?videobam\.com$/ ) ) {
arrDat[i].type = "videobamcom";
arrDat[i].getVideoUrl = getVideoUrl_videobamcom;
} else {
arrDat[i].type = "unknown";
}
}
}
function getVideoUrl_JWPlayer( url, craving ) {
//jwplayer type
try {
var text = craving.getResponseText( url );
} catch( e ) {
text = "";
}
if ( !text ) return "";
if ( text.match( /\bjwplayer\([^)]*?\)\.setup\(\s*(\{[\s\S]*?\}\s*)\s*\)\s*;/m )
&& RegExp.$1.match( /[{,]\s*("|')?file\1\s*:\s*("|')(.*?)\2\s*[},]/ ) ) {
var realUrl = craving.decodeHtml( RegExp.$3 );
}
if ( !realUrl ) return "";
return realUrl;
}
function getVideoUrl_FlowPlayer( url, craving ) {
//flowplayer type
try {
var text = craving.getResponseText( url );
} catch( e ) {
text = "";
}
if ( !text ) return "";
if ( text.match( /[{,]\s*("|'|"|')?playlist\1\s*:\s*\[([\s\S]*?)\]\s*[},]/m ) ) {
var playlist = RegExp.$2;
}
if ( !playlist ) return "";
var objReg = /[{,]\s*("|'|"|')?url\1\s*:\s*("|'|"|')(.*?)\2\s*[},]/gm;
var arrDat = [];
while ( objReg.test( playlist ) ) {
var url0 = decodeURIComponent( RegExp.$3 );
if ( !url0 ) continue;
var obj = {};
obj.url = url0;
var url1 = url0.split( /[?]/ )[0];
obj.ext = url1.match( /\.([^/]+)$/ )? RegExp.$1: "";
obj.extP = obj.ext.match( /flv|mp4|m4v/i )? 1: 0;
arrDat.push( obj );
}
if ( arrDat.length <= 0 ) return "";
arrDat.reverse();
arrDat.sort( function(a,b){return b.extP-a.extP;} );
return arrDat[0].url;
}
function getVideoUrl_mp4upload( url, craving ) {
url = url.replace( /^http:\/\/mp4upload\.com\//, "http://www.mp4upload.com/" );
return getVideoUrl_JWPlayer( url, craving );
}
function getVideoUrl_videofunme( url, craving ) {
return getVideoUrl_FlowPlayer( url, craving );
}
function getVideoUrl_video44net( url, craving ) {
try {
var text = craving.getResponseText( url );
} catch( e ) {
text = "";
}
if ( !text ) return "";
if ( text.match( /
]*?name\s*=\s*("|')?flashvars\2[^>]*)>/im )
&& RegExp.$1.match( /\s+value\s*=\s*("|')(.*?)\1/im ) ) {
var value = "&" + craving.decodeHtml( RegExp.$2 );
if ( value.match( /&file=([^&]+)/ ) ) {
var realUrl = decodeURIComponent( RegExp.$1 );
}
}
if ( !realUrl &&
text.match( /[{,]\s*("|')?file\1\s*:\s*("|')(.*?)\2\s*[},]/ ) ) {
realUrl = RegExp.$3;
}
if ( !realUrl ) return "";
return realUrl;
}
function getVideoUrl_novamovcom( url, craving ) {
var apiurl_base = "http://www.novamov.com/api/player.api.php";
return getVideoUrl_novamovcom_sub( url, apiurl_base, craving );
}
function getVideoUrl_novamovcom_sub( url, apiurl_base, craving ) {
try {
var text = craving.getResponseText( url );
} catch( e ) {
text = "";
}
if ( !text ) return "";
if ( text.match( /\bflashvars\.file\s*=\s*("|')(.*?)\1\s*;/ ) ) {
var vid = RegExp.$2;
}
if ( !vid ) return "";
if ( text.match( /\bflashvars\.filekey\s*=\s*("|')(.*?)\1\s*;/ ) ) {
var filekey = RegExp.$2;
}
if ( !filekey && text.match( /\bflashvars\.filekey\s*=\s*(\w+)\s*;/ ) ) {
var objReg = new RegExp( "var\\s+" + RegExp.$1 + "\\s*=\\s*(\"|')(.*?)\\1\\s*;", "m" );
if ( objReg.test( text ) ) filekey = RegExp.$2;
}
if ( !filekey ) return "";
var apiurl = apiurl_base
+ "?file=" + encodeURIComponent( vid )
+ "&key=" + encodeURIComponent( filekey )
+ "&user=undefined"
+ "&pass=undefined"
+ "&cid=undefined&cid2=undefined&cid3=undefined";
try {
text = craving.getResponseText( apiurl );
} catch( e ) {
text = "";
}
if ( !text ) return "";
text = "&" + text;
if ( text.match( /&url=([^&]+)/ ) ) var realUrl = decodeURIComponent( RegExp.$1 );
if ( !realUrl ) return "";
//if ( text.match( /&title=([^&]+)/ ) ) var title = decodeURIComponent( RegExp.$1 );
return realUrl;
}
function getVideoUrl_videoweedes( url, craving ) {
var apiurl_base = "http://www.videoweed.es/api/player.api.php";
return getVideoUrl_novamovcom_sub( url, apiurl_base, craving );
}
function getVideoUrl_youruploadcom( url, craving ) {
try {
var text = craving.getResponseText( url );
} catch( e ) {
text = "";
var errNo = e.number & 0xffff;
}
if ( errNo === 5 ) {
try {
var objHttp = new ActiveXObject( "WinHttp.WinHttpRequest.5.1" );
objHttp.open( "GET", url, false );
objHttp.send();
text = objHttp.responseText;
} catch( e ) {
text = "";
}
}
if ( !text ) return "";
if ( text.match( /