- UID
- 10253
- 帖子
- 3334
- 精华
- 0
- 贡献
- 20
- 推广
- 0
- 有效BUG
- 0
- 来自
- 江门·中国
- 注册时间
- 2006-4-28
|
55#
发表于 2006-11-2 01:02
| 只看该作者
11月2号增加对mofile的支持。其实我也想简单点。但 d**n it !!
规矩照旧。记事本打开MediaSaver.js ,在最后一行粘贴上以下代码
- /* code bY kkf @ 2006 .11.2
- kkf009@gmail.com
- */
- function mofileMedia()
- {
- strUrl=twSaveObjUrl%%s;
- if(-1!=strUrl.search(/http:\/\/tv\.mofile\.com\/.*\.swf/)){
- strUrl=document.getElementById(twObjectUID%%s).innerHTML.toString();
- strID = strUrl.replace(/([^>]|>)*?v=(\w{8}).*/,"$2");
- strTempUrl = "http://tv.mofile.com/cn/videoplay/play.do?v="+strID;
- strBuffer = external.twQueryHistory( strTempUrl + "*", true );
- if( strBuffer.length <= 0 )
- {
- strBuffer = GetBufferFromUrl( strTempUrl );
- }
- if( strBuffer.length > 0 )
- { //偶想过用DOM 读XML.无奈自己笨,不会.哭...
- xmlDomain=strBuffer.replace(/([^>]|>)*?<domain>(.*)<\/domain>([^>]|>)*/,"$2");
- xmlPath=strBuffer.replace(/([^>]|>)*?<path>(.*)<\/path>([^>]|>)*/,"$2");
- xmlDowndomainname=strBuffer.replace(/([^>]|>)*?<downdomainname>(.*)<\/downdomainname>([^>]|>)*/,"$2");
- xmlMd5 =strBuffer.replace(/([^>]|>)*?<md5>(.*)<\/md5>([^>]|>)*/,"$2");
- xmlAuditTime =strBuffer.replace(/([^>]|>)*?<auditTime>(.*)<\/auditTime>([^>]|>)*/,"$2");
- function translate(input) {
- var str = "r6JNhkeIdl0vMmun829C3sg5qXacwGH1bV4xPypfz7SFYTtEWADiORZLQUBKjo";
- var rnd = Math.round(Math.random() * 40) + 10;
- var tmp1 = new Array (input.length);
- var i = 0;
- while (i < 61) {
- var strTmp = str.indexOf(input.substr(i,1));
- strTmp = strTmp + rnd;
- if (strTmp > (str.length - 1)) {
- strTmp = strTmp - str.length;
- }
- tmp1 = str.charAt(strTmp);
- i++;
- }
- return (rnd.toString() + tmp1.join(""));
- }
-
- strTemp = "http:\/\/"+xmlDomain+"?p="+translate(xmlPath+xmlMd5+xmlAuditTime)+"&down="+xmlDowndomainname;
- external.twMediaPath( window, strTemp );
- }
- }
- }
- mofileMedia();
复制代码
[ 本帖最后由 needed 于 2006-11-2 01:10 编辑 ] |
|