迅雷链接转为普通链接(js实现) 您所在的位置:网站首页 电驴地址转换 迅雷链接转为普通链接(js实现)

迅雷链接转为普通链接(js实现)

2024-06-18 10:51| 来源: 网络整理| 查看: 265

迅雷链接转为普通链接(js实现)

正好刚学js就打了这么个玩意,复制保存为.html文件打开或者点下面链接就可以用啦。

点击本链接预览使用:https://zero0mum.github.io/web/others/others/磁力链接转换.html

本代码github地址 https://github.com/zero0mum/web/blob/master/others/磁力链接转换.html

磁力链接转换 输入迅雷链接: 转换 function thunderToNormal(){ var thunder = document.getElementById("x").value;//从id为x的input标签中获取迅雷链接的值 if(thunder.substring(0,10).search("thunder")!=-1||thunder.substring(0,10).search("Thunder")!=-1)//判断如果上一0~10个字符句获取到的字符中是否包含thunder或Thunder { thunder = thunder.substring(10,);//把thunder第十个字符(含第10个)开始到最后的字符赋值给自己 即去掉链接中 thunder:// var normal = window.atob(thunder);//base64解码 var len = normal.length-2;//获取长度 normal = normal.substring(2,len); normal = decodeURI(normal);//url解码 document.getElementById("y").value = normal;//输出到input文本框 } else alert("所输入非迅雷链接 eg:Thunder://QUFodHRwOi8vaW0uYmFpZHUuY29tL2luc3RhbGwvQmFpZHVIaS5leGVaWg== 注意:thunder://前不得有空格等其他字符"); }

迅雷专用链接编码:

在原地址前面加"AA",后面加"ZZ"(不包括引号),地址变为

AAhttp://im.baidu.com/install/BaiduHi.exeZZ

此地址base64编码为

QUFodHRwOi8vaW0uYmFpZHUuY29tL2luc3RhbGwvQmFpZHVIaS5leGVaWg==

迅雷专链即在上地址前加thunder://,即

Thunder://QUFodHRwOi8vaW0uYmFpZHUuY29tL2luc3RhbGwvQmFpZHVIaS5leGVaWg== 原理参考https://blog.csdn.net/weixin_34023863/article/details/86039452



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有