一个很全的地址转换类

  • 内容
  • 相关
$("change").onclick = function(){
		var nurl;
		
		var v1 = $("b_url").value;

		if(!v1){$("b_url").value = "请填入网盘地址,网盘样式看下边,别弄错了哦!";return false;}

		var pattern = /shareid=([0-9]+)&uk=([0-9]+)/;

		var pattern1 = /down\/index\/([0-9]+)/;

		var pattern2 = /id_([0-9]+).htm/;

		var pattern3 = /file\/([0-9]+)/;

		var pattern4 = /weibo.com\/s\/([^.]+)/;
		var pattern5 = /9ku.com\/play\/([0-9]+).htm/;;

		var pattern6 = /weiyun.com\/([^.]+)/;
		var pattern7 = /songtaste.com\/song\/([0-9]+)/;
		var pattern8 = /xiami.com\/song\/([0-9]+)/;
		var pattern9 = /yunpan.cn\/([^.]+)/;
		var pattern10 = /vmall.com\/([^.]+)/;//var pattern10 = /([a-zA-Z]+[0-9].+)/;
		var pattern77 = /dbank.com\/([^.]+)/;
		var pattern11 = /rayfile.com\/zh-cn\/files\/([^.]+)/;
		var pattern12 = /baidu.com\/s\/([^.]+)/;
		var pattern13 = /resid=([^.]+)&authkey/;
		var pattern14 = /wo99.com\/mplay.php\?id=([0-9]+)/;
		var pattern15 = /yueku\/i\/([0-9]+).html/;
		var pattern16 = /dance\/play\/([0-9]+).html/;;
		var pattern17 = /5sing.com\/([0-9]+).html/;
		var pattern18 = /vdisk.home.news.cn\/vdisk\/download\/([^.]+)/;
		var pattern19 = /tindeck.com\/listen\/([^.]+)/;
		var pattern20 = /app.box.com\/s\/([^.]+)/;
		var pattern21 = /www.sudupan.com\/sudupan\/f_([0-9]+).aspx/;
		var pattern22 = /www.jswangpan.com\/down_([0-9]+).aspx/;
		var pattern23 = /www.duomi.com\/track\/([0-9]+)/;
		var pattern24 = /www.kuwo.cn\/yinyue\/([0-9]+)/;
		var pattern25 = /music.a8.com\/view\/([0-9]+)/;
		var pattern26 = /www.realmusic.ru\/songs\/([0-9]+)/;
		var pattern27 = /www.xbdj.cn\/play\/([0-9]+).html/;
		var pattern28 = /y.qq.com\/#type=song&mid=([^.]+)/;
		var pattern29 = /dj527.com\/html\/down\/([0-9]+).html/;
		var pattern30 = /music.baidu.com\/song\/([0-9]+)/;
		var pattern31 = /1ting.com\/player\/([^.]+)\/player_([0-9]+).html/;
		var pattern32 = /song_id=([0-9]+)/;
		var pattern33 = /realmusic.ru\/songs\/([^.]+)/;
		var pattern34 = /reg_id=([0-9]+)&song_id=([0-9]+)/;
		var pattern35 = /ximalaya.com\/([0-9]+)\/sound\/([0-9]+)/;
		var pattern36 = /www.musickc.com\/play\/([0-9]+).html/;
		var pattern37 = /www.chang30.com\/play\/([0-9]+).html/;
		var pattern38 = /www.yyqq.com\/([0-9]+).html/;
		var pattern39 = /play.9sky.com\/t_([0-9]+)/;
		var pattern40 = /www.nhaccuatui.com\/bai-hat\/([^.]+).([^.]+).html/;
		var pattern41 = /www.565656.com\/ting\/([0-9]+).htm/;
		var pattern42 = /mp3.51.com\/([^.]+)\/music\/([0-9]+).html/;
		var s = v1.match(pattern);

		var s1 = v1.match(pattern1);

		var s2 = v1.match(pattern2);

		var s3 = v1.match(pattern3);

		var s4 = v1.match(pattern4);

		var s5 = v1.match(pattern5);

		var s6 = v1.match(pattern6);
		var s7 = v1.match(pattern7);
		var s8 = v1.match(pattern8);
		var s9 = v1.match(pattern9);
		var s10 = v1.match(pattern10);
		var s77 = v1.match(pattern77);
		var s11 = v1.match(pattern11);
		var s12 = v1.match(pattern12);
		var s13 = v1.match(pattern13);
		var s14 = v1.match(pattern14);
		var s15 = v1.match(pattern15);
		var s16 = v1.match(pattern16);
		var s17 = v1.match(pattern17);
		var s18 = v1.match(pattern18);
		var s19 = v1.match(pattern19);
		var s20 = v1.match(pattern20);
		var s21 = v1.match(pattern21);
		var s22 = v1.match(pattern22);
		var s23 = v1.match(pattern23);
		var s24 = v1.match(pattern24);
		var s25 = v1.match(pattern25);
		var s26 = v1.match(pattern26);
		var s27 = v1.match(pattern27);
		var s28 = v1.match(pattern28);
		var s29 = v1.match(pattern29);
		var s30 = v1.match(pattern30);
		var s31 = v1.match(pattern31);
		var s32 = v1.match(pattern32);
		var s33 = v1.match(pattern33);
		var s34 = v1.match(pattern34);
		var s35 = v1.match(pattern35);
		var s36 = v1.match(pattern36);
		var s37 = v1.match(pattern37);
		var s38 = v1.match(pattern38);
		var s39 = v1.match(pattern39);
		var s40 = v1.match(pattern40);
		var s41 = v1.match(pattern41);
		var s42 = v1.match(pattern42);
		if(s != null){

		if(s[1] && s[2]){

			nurl = $("w_url").value = "http://tv1314.com/mp3/bd.php/"+s[1]+"/"+s[2]+".mp3";

			//alert(1);
			}else{

			$("w_url").value = "百度网盘格式不对,请检查格式。";

		    }

		}else if(s1 != null){

			if(s1[1]){

			nurl = $("w_url").value = "http://tv1314.com/mp3/vd.php/"+s1[1]+".mp3";
			//AudioPlayer.embed("//AudioPlayer_1", {soundFile: nurl, autostart: "yes",loop:"yes"});
 
			}else{

			$("w_url").value = "威盘地址格式不对,请检查格式。";

			}
		}else if(s2 != null){

			if(s2[1]){

			nurl = $("w_url").value = "http://tv1314.com/mp3/kp.php/?"+s2[1]+"/tv1314.com.mp3";

			//AudioPlayer.embed("//AudioPlayer_1", {soundFile: nurl, autostart: "yes",loop:"yes"});
 
			}else{

			$("w_url").value = "金山快盘地址格式不对,请检查格式。";

			}

		}else if(s3 != null){

			if(s3[1]){

			nurl = $("w_url").value = "http://tv1314.com/mp3/ct.php/"+s3[1]+"/tv1314.com.mp3";

			//AudioPlayer.embed("//AudioPlayer_1", {soundFile: nurl, autostart: "yes",loop:"yes"});
 
			}else{

			$("w_url").value = "城通网盘地址格式不对,请检查格式。";

			}

		}else if(s4 != null){

			if(s4[1]){

			nurl = $("w_url").value = "http://tv1314.com/mp3/wb.php/?"+s4[1]+"/tv1314.com.mp3";

			//AudioPlayer.embed("//AudioPlayer_1", {soundFile: nurl, autostart: "yes",loop:"yes"});
 
			}else{

			$("w_url").value = "新浪微盘地址格式不对,请检查格式。";

			}

		}else if(s5 != null){

			if(s5[1]){

			nurl = $("w_url").value = "http://tv1314.com/mp3/9k.php/"+s5[1]+"/tv1314.com.mp3";

			//AudioPlayer.embed("//AudioPlayer_1", {soundFile: nurl, autostart: "yes",loop:"yes"});
 
			}else{

			$("w_url").value = "九酷音乐地址格式不对,请检查格式。";

			}

		}else if(s6 != null){
			if(s6[1]){
			nurl = $("w_url").value = "http://tv1314.com/mp3/q.php/?"+s6[1]+".mp3";
			//AudioPlayer.embed("//AudioPlayer_1", {soundFile: nurl, autostart: "yes",loop:"yes"}); 
			}else{
			$("w_url").value = "QQ微云音乐地址格式不对,请检查格式。";
			}
		}else if(s7 != null){
			if(s7[1]){
			nurl = $("w_url").value = "http://tv1314.com/mp3/st.php/?"+s7[1]+"/tv1314.com.mp3";
			//AudioPlayer.embed("//AudioPlayer_1", {soundFile: nurl, autostart: "yes",loop:"yes"}); 
			}else{
			$("w_url").value = "songtaste地址格式不对,请检查格式。";
			}
		}else if(s8 != null){
			if(s8[1]){
			nurl = $("w_url").value = "http://tv1314.com/mp3/xm.php/"+s8[1]+"/tv1314.com.mp3";
			//AudioPlayer.embed("//AudioPlayer_1", {soundFile: nurl, autostart: "yes",loop:"yes"}); 
			}else{
			$("w_url").value = "虾米地址格式不对,请检查格式。";
			}
		}else if(s9 != null){
			if(s9[1]){
			nurl = $("w_url").value = "http://tv1314.com/mp3/360.php/?"+s9[1]+".mp3";
			//AudioPlayer.embed("//AudioPlayer_1", {soundFile: nurl, autostart: "yes",loop:"yes"}); 
			}else{
			$("w_url").value = "360网盘地址格式不对,请检查格式。";
			}
		}else if(s10 != null){
			if(s10[1]){
			nurl = $("w_url").value = "http://tv1314.com/mp3/hw.php/?"+s10[1]+"/csqq8.mp3";
			//AudioPlayer.embed("//AudioPlayer_1", {soundFile: nurl, autostart: "yes",loop:"yes"}); 
			}else{
			$("w_url").value = "华为网盘地址格式不对,请检查格式。";
			}
		}else if(s77 != null){
			if(s77[1]){
			nurl = $("w_url").value = "http://tv1314.com/mp3/hw.php/?"+s77[1]+"/csqq8.mp3";
			//AudioPlayer.embed("//AudioPlayer_1", {soundFile: nurl, autostart: "yes",loop:"yes"}); 
			}else{
			$("w_url").value = "华为网盘地址格式不对,请检查格式。";
			}
		}else if(s11 != null){
			if(s11[1]){
			nurl = $("w_url").value = "http://tv1314.com/mp3/qq.php/?"+s11[1]+"/csqq8.mp3";
			//AudioPlayer.embed("//AudioPlayer_1", {soundFile: nurl, autostart: "yes",loop:"yes"}); 
			}else{
			$("w_url").value = "飞速网音乐地址格式不对,请检查格式。";
			}
		}else if(s12 != null){
			if(s12[1]){
			nurl = $("w_url").value = "http://tv1314.com/mp3/bd.php/"+s12[1]+".mp3";
			//AudioPlayer.embed("//AudioPlayer_1", {soundFile: nurl, autostart: "yes",loop:"yes"}); 
			}else{
			$("w_url").value = "百度网盘音乐地址格式不对,请检查格式。";
			}
		}else if(s13 != null){
			if(s13[1]){
			nurl = $("w_url").value = "http://tv1314.com/mp3/wr.php/?"+s13[1]+"/csqq8.mp3";
			//AudioPlayer.embed("//AudioPlayer_1", {soundFile: nurl, autostart: "yes",loop:"yes"}); 
			}else{
			$("w_url").value = "微软网盘音乐地址格式不对,请检查格式。";
			}
		}else if(s14 != null){
			if(s14[1]){
			nurl = $("w_url").value = "http://tv1314.com/mp3/wo99.php/?"+s14[1]+"/csqq8.mp3";
			//AudioPlayer.embed("//AudioPlayer_1", {soundFile: nurl, autostart: "yes",loop:"yes"}); 
			}else{
			$("w_url").value = "wo99音乐地址格式不对,请检查格式。";
			}
		}else if(s15 != null){
			if(s15[1]){
			nurl = $("w_url").value = "http://tv1314.com/mp3/sinamusic.php/?"+s15[1]+"/csqq8.mp3";
			//AudioPlayer.embed("//AudioPlayer_1", {soundFile: nurl, autostart: "yes",loop:"yes"}); 
			}else{
			$("w_url").value = "新浪乐库音乐地址格式不对,请检查格式。";
			}
		}else if(s16 != null){
			if(s16[1]){
			nurl = $("w_url").value = "http://tv1314.com/mp3/djkk.php/?"+s16[1]+"/csqq8.mp3";
			//AudioPlayer.embed("//AudioPlayer_1", {soundFile: nurl, autostart: "yes",loop:"yes"}); 
			}else{
			$("w_url").value = "DJKK音乐网地址格式不对,请检查格式。";
			}
		}else if(s17 != null){
			if(s17[1]){
			nurl = $("w_url").value = "http://tv1314.com/mp3/5sing.php/?"+s17[1]+"/csqq8.mp3";
			//AudioPlayer.embed("//AudioPlayer_1", {soundFile: nurl, autostart: "yes",loop:"yes"}); 
			}else{
			$("w_url").value = "5sing音乐地址格式不对,请检查格式。";
			}
		}else if(s18 != null){
			if(s18[1]){
			nurl = $("w_url").value = "http://tv1314.com/mp3/news.php/?"+s18[1]+".mp3";
			//AudioPlayer.embed("//AudioPlayer_1", {soundFile: nurl, autostart: "yes",loop:"yes"}); 
			}else{
			$("w_url").value = "新华云盘地址格式不对,请检查格式。";
			}
		}else if(s19 != null){
			if(s19[1]){
			nurl = $("w_url").value = "http://tv1314.com/mp3/pkxh.php/?"+s19[1]+".mp3";
			//AudioPlayer.embed("//AudioPlayer_1", {soundFile: nurl, autostart: "yes",loop:"yes"}); 
			}else{
			$("w_url").value = "Tindeck MP3地址格式不对,请检查格式。";
			}
		}else if(s20 != null){
			if(s20[1]){
			nurl = $("w_url").value = "http://tv1314.com/mp3/box.php/?"+s20[1]+".mp3";
			//AudioPlayer.embed("//AudioPlayer_1", {soundFile: nurl, autostart: "yes",loop:"yes"}); 
			}else{
			$("w_url").value = "Box网盘地址格式不对,请检查格式。";
			}
		}else if(s21 != null){
			if(s21[1]){
			nurl = $("w_url").value = "http://tv1314.com/mp3/sdp.php/?"+s21[1]+".mp3";
			//AudioPlayer.embed("//AudioPlayer_1", {soundFile: nurl, autostart: "yes",loop:"yes"}); 
			}else{
			$("w_url").value = "速度网盘地址格式不对,请检查格式。";
			}
		}else if(s22 != null){
			if(s22[1]){
			nurl = $("w_url").value = "http://tv1314.com/mp3/js.php/?"+s22[1]+".mp3";
			//AudioPlayer.embed("//AudioPlayer_1", {soundFile: nurl, autostart: "yes",loop:"yes"}); 
			}else{
			$("w_url").value = "极速网盘地址格式不对,请检查格式。";
			}
		}else if(s23 != null){
			if(s23[1]){
			nurl = $("w_url").value = "http://tv1314.com/mp3/duomi.php/?"+s23[1]+".mp3";
			//AudioPlayer.embed("//AudioPlayer_1", {soundFile: nurl, autostart: "yes",loop:"yes"}); 
			}else{
			$("w_url").value = "多米音乐地址格式不对,请检查格式。";
			}
		}else if(s24 != null){
			if(s24[1]){
			nurl = $("w_url").value = "http://tv1314.com/mp3/kuwo.php/?"+s24[1]+".mp3";
			//AudioPlayer.embed("//AudioPlayer_1", {soundFile: nurl, autostart: "yes",loop:"yes"}); 
			}else{
			$("w_url").value = "酷我音乐地址格式不对,请检查格式。";
			}
		}else if(s25 != null){
			if(s25[1]){
			nurl = $("w_url").value = "http://tv1314.com/mp3/a8.php/?"+s25[1]+".mp3";
			//AudioPlayer.embed("//AudioPlayer_1", {soundFile: nurl, autostart: "yes",loop:"yes"}); 
			}else{
			$("w_url").value = "a8音乐地址格式不对,请检查格式。";
			}
		}else if(s26 != null){
			if(s26[1]){
			nurl = $("w_url").value = "http://tv1314.com/mp3/rm.php/?"+s26[1]+".mp3";
			//AudioPlayer.embed("//AudioPlayer_1", {soundFile: nurl, autostart: "yes",loop:"yes"}); 
			}else{
			$("w_url").value = "RealMusic音乐地址格式不对,请检查格式。";
			}
		}else if(s27 != null){
			if(s27[1]){
			nurl = $("w_url").value = "http://tv1314.com/mp3/xb.php/?"+s27[1]+".mp3";
			//AudioPlayer.embed("//AudioPlayer_1", {soundFile: nurl, autostart: "yes",loop:"yes"}); 
			}else{
			$("w_url").value = "小白舞曲网地址格式不对,请检查格式。";
			}
		}else if(s28 != null){
			if(s28[1]){
			nurl = $("w_url").value = "http://tv1314.com/mp3/qqyy.php/?"+s28[1]+".mp3";
			//AudioPlayer.embed("//AudioPlayer_1", {soundFile: nurl, autostart: "yes",loop:"yes"}); 
			}else{
			$("w_url").value = "QQ音乐站地址格式不对,请检查格式。";
			}
		}else if(s29 != null){
			if(s29[1]){
			nurl = $("w_url").value = "http://tv1314.com/mp3/dj527.php/?"+s29[1]+".mp3";
			//AudioPlayer.embed("//AudioPlayer_1", {soundFile: nurl, autostart: "yes",loop:"yes"}); 
			}else{
			$("w_url").value = "DJ527舞曲网地址格式不对,请检查格式。";
			}
		}else if(s30 != null){
			if(s30[1]){
			nurl = $("w_url").value = "http://tv1314.com/mp3/baidu.php/?"+s30[1]+".wma";
			//AudioPlayer.embed("//AudioPlayer_1", {soundFile: nurl, autostart: "yes",loop:"yes"}); 
			}else{
			$("w_url").value = "百度音乐网地址格式不对,请检查格式。";
			}
		}else if(s31 != null){
			if(s31[1]){
			nurl = $("w_url").value = "http://tv1314.com/mp3/1ting.php/?"+s31[2]+".mp3";
			//AudioPlayer.embed("//AudioPlayer_1", {soundFile: nurl, autostart: "yes",loop:"yes"}); 
			}else{
			$("w_url").value = "1ting音乐网地址格式不对,请检查格式。";
			}
		}else if(s32 != null){
			if(s32[1]){
			nurl = $("w_url").value = "http://tv1314.com/mp3/ttdt.php/?"+s32[1]+".mp3";
			//AudioPlayer.embed("//AudioPlayer_1", {soundFile: nurl, autostart: "yes",loop:"yes"}); 
			}else{
			$("w_url").value = "天天动听音乐网地址格式不对,请检查格式。";
			}
		}else if(s33 != null){
			if(s33[1]){
			nurl = $("w_url").value = "http://tv1314.com/mp3/rm.php/?"+s33[1]+"/csqq8.mp3";
			//AudioPlayer.embed("//AudioPlayer_1", {soundFile: nurl, autostart: "yes",loop:"yes"}); 
			}else{
			$("w_url").value = "RealMusic地址格式不对,请检查格式。";
			}
		}else if(s34 != null){
			if(s34[1]){
			nurl = $("w_url").value = "http://tv1314.com/mp3/yyfc.php/"+s34[1]+"/"+s34[2]+".mp3";
			//AudioPlayer.embed("//AudioPlayer_1", {soundFile: nurl, autostart: "yes",loop:"yes"}); 
			}else{
			$("w_url").value = "YYFC音乐地址格式不对,请检查格式。";
			}
		}else if(s35 != null){
			if(s35[1]){
			nurl = $("w_url").value = "http://tv1314.com/mp3/xmly.php/?"+s35[2]+"/csqq8.mp3";
			//AudioPlayer.embed("//AudioPlayer_1", {soundFile: nurl, autostart: "yes",loop:"yes"}); 
			}else{
			$("w_url").value = "喜马拉雅音乐地址格式不对,请检查格式。";
			}
		}else if(s36 != null){
			if(s36[1]){
			nurl = $("w_url").value = "http://tv1314.com/mp3/musickc.php/?"+s36[1]+".wma";
			//AudioPlayer.embed("//AudioPlayer_1", {soundFile: nurl, autostart: "yes",loop:"yes"}); 
			}else{
			$("w_url").value = "音乐快车网地址格式不对,请检查格式。";
			}
		}else if(s37 != null){
			if(s37[1]){
			nurl = $("w_url").value = "http://tv1314.com/mp3/chang30.php/?"+s37[1]+".mp3";
			//AudioPlayer.embed("//AudioPlayer_1", {soundFile: nurl, autostart: "yes",loop:"yes"}); 
			}else{
			$("w_url").value = "唱30音乐网地址格式不对,请检查格式。";
			}
		}else if(s38 != null){
			if(s38[1]){
			nurl = $("w_url").value = "http://tv1314.com/mp3/yyqq.php/?"+s38[1]+".wma";
			//AudioPlayer.embed("//AudioPlayer_1", {soundFile: nurl, autostart: "yes",loop:"yes"}); 
			}else{
			$("w_url").value = "YYQQ音乐地址格式不对,请检查格式。";
			}
		}else if(s39 != null){
			if(s39[1]){
			nurl = $("w_url").value = "http://tv1314.com/mp3/9sky.php/?"+s39[1]+".mp3";
			//AudioPlayer.embed("//AudioPlayer_1", {soundFile: nurl, autostart: "yes",loop:"yes"}); 
			}else{
			$("w_url").value = "九天音乐网地址格式不对,请检查格式。";
			}
		}else if(s40 != null){
			if(s40[1]){
			nurl = $("w_url").value = "http://tv1314.com/mp3/nct.php/?"+s40[2]+".mp3";
			//AudioPlayer.embed("//AudioPlayer_1", {soundFile: nurl, autostart: "yes",loop:"yes"}); 
			}else{
			$("w_url").value = "Nhaccuatui.com地址格式不对,请检查格式。";
			}
		}else if(s41 != null){
			if(s41[1]){
			nurl = $("w_url").value = "http://tv1314.com/mp3/565656.php/?"+s41[1]+".m4a";
			//AudioPlayer.embed("//AudioPlayer_1", {soundFile: nurl, autostart: "yes",loop:"yes"}); 
			}else{
			$("w_url").value = "565656音乐站地址格式不对,请检查格式。";
			}
		}else if(s42 != null){
			if(s42[1]){
			nurl = $("w_url").value = "http://tv1314.com/mp3/51.php/?"+s42[2]+".mp3";
			//AudioPlayer.embed("//AudioPlayer_1", {soundFile: nurl, autostart: "yes",loop:"yes"}); 
			}else{
			$("w_url").value = "51音乐站地址格式不对,请检查格式。";
			}
		}else{
			$("w_url").value = "亲,您写的地址不对吧?仔细瞧瞧,我搞不定啊~!";
		}
		if(nurl)addcmp(nurl);
	}
}


本文标签:

版权声明:若无特殊注明,本文皆为《鬼少》原创,转载请保留文章出处。

本文链接:一个很全的地址转换类 - http://tv1314.com/post-101.html

发表评论

电子邮件地址不会被公开。 必填项已用*标注

00:00 / 00:00
顺序播放