2025最新可用-百度网盘SVIP高速解析直链的不限速下载助手-文武PanDownload

2025年3月持续更新可用,不限制速度的百度网盘SVIP解析高速直链的脚本助手,无视黑号,100%可用,不限制文件大小,下载速度最快可达10M+/s,支持 Gopeed(一键解析)、IDM、NDM 等多线程极速下载工具,支持 Google Chrome、Microsoft Edge、Firefox 等浏览器。

目前为 2025-03-18 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name 2025最新可用-百度网盘SVIP高速解析直链的不限速下载助手-文武PanDownload
  3. // @namespace https://github.com/dongyubin/Baidu-VIP
  4. // @version 7.5
  5. // @description 2025年3月持续更新可用,不限制速度的百度网盘SVIP解析高速直链的脚本助手,无视黑号,100%可用,不限制文件大小,下载速度最快可达10M+/s,支持 Gopeed(一键解析)、IDM、NDM 等多线程极速下载工具,支持 Google Chrome、Microsoft Edge、Firefox 等浏览器。
  6. // @author dongyubin
  7. // @homepage https://fk.wwkejishe.top/buy/23
  8. // @supportURL https://fk.wwkejishe.top/buy/23
  9. // @license MIT
  10. // @icon https://fk.wwkejishe.top/uploads/images/6e798005b00ce678782af4e6931f4374.png
  11. // @resource layuiCSS https://cdnjs.cloudflare.com/ajax/libs/layui/2.9.20/css/layui.min.css
  12. // @require https://cdnjs.cloudflare.com/ajax/libs/layui/2.9.20/layui.min.js
  13. // @require https://cdnjs.cloudflare.com/ajax/libs/sweetalert/2.1.2/sweetalert.min.js
  14. // @match *://pan.baidu.com/*
  15. // @match *://yun.baidu.com/*
  16. // @match *://pan.baidu.com/disk/home*
  17. // @match *://yun.baidu.com/disk/home*
  18. // @match *://pan.baidu.com/disk/timeline*
  19. // @match *://yun.baidu.com/disk/timeline*
  20. // @match *://pan.baidu.com/disk/main*
  21. // @match *://yun.baidu.com/disk/main*
  22. // @match *://pan.baidu.com/disk/base*
  23. // @match *://yun.baidu.com/disk/base*
  24. // @match *://pan.baidu.com/s/*
  25. // @match *://yun.baidu.com/s/*
  26. // @match *://pan.baidu.com/aipan/*
  27. // @match *://yun.baidu.com/aipan/*
  28. // @match *://pan.baidu.com/share/*
  29. // @match *://yun.baidu.com/share/*
  30. // @match *://openapi.baidu.com/*
  31. // @connect api.aifenxiang.net.cn
  32. // @connect baidu.com
  33. // @connect *
  34. // @connect 127.0.0.1
  35. // @grant GM_cookie
  36. // @grant GM_addStyle
  37. // @grant GM_getResourceText
  38. // @grant GM_xmlhttpRequest
  39. // @grant GM_setClipboard
  40. // @grant GM_notification
  41. // @grant GM_info
  42. // @grant GM_getValue
  43. // @grant GM_setValue
  44. // @grant GM_deleteValue
  45. // @antifeature ads
  46. // @antifeature membership
  47. // @antifeature referral-link
  48. // ==/UserScript==
  49. (function () {
  50. 'use strict';
  51. const layuiCss = GM_getResourceText('layuiCSS');
  52. GM_addStyle(layuiCss + `
  53. .layui-icon-close:before {
  54. content: "x" !important;
  55. }
  56. li {
  57. list-style: normal !important;
  58. }
  59. `);
  60. const wwConfig = {
  61. mainUrl: 'https://api.aifenxiang.net.cn',
  62. vipUrl: 'https://vipan.wangdu.site',
  63. bdPassword: '1234',
  64. titleName: '文武PanDownload',
  65. goPeedTaskUrl: 'http://127.0.0.1:9999/api/v1/tasks',
  66. one_parse: {
  67. code: '1.1.2',
  68. version: '1.1.4'
  69. },
  70. wx_parse: {
  71. version: "1.0.9"
  72. },
  73. gopeed: {
  74. name: 'GoPeed',
  75. url: 'https://pan.quark.cn/s/0b2e9c6e94b0'
  76. },
  77. ndm: {
  78. name: 'NDM',
  79. url: 'https://neatdownloadmanager.com/index.php/en/'
  80. },
  81. idm: {
  82. name: 'IDM',
  83. url: 'https://www.wangdu.site/software/tools/380.html'
  84. },
  85. pandown: {
  86. month: 'https://fk.wwkejishe.top/buy/23',
  87. quarter: 'https://fk.wwkejishe.top/buy/24',
  88. halfYear: 'https://fk.wwkejishe.top/buy/25',
  89. year: 'https://fk.wwkejishe.top/buy/26',
  90. life: 'https://fk.wwkejishe.top/buy/27'
  91. },
  92. liulanqi: {
  93. chrome: 'https://www.google.cn/intl/zh-CN/chrome/'
  94. },
  95. monthCard: 'http://vip.jiufei.com/lin/GI5LG4?refer=1661',
  96. wechatCode: '验证码',
  97. debug_link: 'https://github.com/dongyubin/Baidu-VIP/issues',
  98. authorWechat: 'dyb54188',
  99. help_document: 'https://flowus.cn/share/c68e3c55-67e5-460f-b937-7727e0378a34?code=BCRWJL'
  100. };
  101.  
  102. const danger_info = `<p style="font-weight:900; text-align: center;">请更新到最新版本再使用,优先选择
  103. <a style="color:red;" target="_blank" href="`+ wwConfig.liulanqi.chrome + `">Google Chrome 浏览器</a>(部分校园网可能不支持解析)
  104. </p>
  105. <p style="font-weight:900;">
  106. ⚠️❗ 一定要先配置好 <a href="`+ wwConfig.gopeed.url + `" target="_blank" style="font-weight: 900;color: #409eff;">` + wwConfig.gopeed.name + `</a> 下载器的 User-Agent、端口、连接数: <a style="color:red;" target="_blank" href="` + wwConfig.help_document + `">点击查看 Gopeed 配置教程说明</a>
  107. </p>
  108. <p>
  109. 不限次数 PC 网页稳定版:<a style="color:red;font-weight:900;" target="_blank" href="https://pandown.wangdu.site/">点击前往</a>
  110. </p>`;
  111.  
  112. const pandownload_info = `<li>
  113. <a href="https://pandown.wangdu.site/vip/login" target="_blank"
  114. style="color: #007bff; text-decoration: none;">Pandownload</a>会员卡:
  115. <a href="`+ wwConfig.pandown.month + `" target="_blank"
  116. style="color: #007bff; text-decoration: none;">月卡</a>、
  117. <a href="`+ wwConfig.pandown.quarter + `" target="_blank"
  118. style="color: #007bff; text-decoration: none;">季卡</a>、
  119. <a href="`+ wwConfig.pandown.halfYear + `" target="_blank"
  120. style="color: #007bff; text-decoration: none;">半年卡</a>、
  121. <a href="`+ wwConfig.pandown.year + `" target="_blank"
  122. style="color: #007bff; text-decoration: none;">年卡</a>、
  123. <a href="`+ wwConfig.pandown.life + `" target="_blank"
  124. style="color: #007bff; text-decoration: none;">永久卡</a>
  125. </li>`;
  126. const free_tab_info = `<div class="layui-tab-item">
  127. <div class="layui-form" lay-filter="filter-test-layer"
  128. style="width:360px;margin: 16px auto 0; background-color: #fff; border-radius: 8px; padding: 20px;">
  129. <div class="demo-send-container">
  130. <div class="layui-text">
  131. <p>插件解析免费 <span style="font-weight:600;">2</span> 次</p>
  132. <p>(提示:解析次数已达上限,代表失效,静等更新。)</p>
  133. <p>如果失效,请使用<strong>验证码解析</strong></p>
  134. `+ danger_info + `
  135. </div>
  136. <div class="layui-btn-container">
  137. <button style="margin-top:30px; border-radius: 8px;" id="gopeedSetBtn"
  138. class="layui-btn layui-btn-fluid layui-bg-red" lay-submit lay-filter="gopeed-set">1️⃣
  139. Gopeed设置教程</button>
  140. <!--
  141. <button style="margin-top:10px; border-radius: 8px;" id="copyUaBtn"
  142. class="layui-btn layui-btn-fluid layui-bg-orange" lay-submit lay-filter="copy-ua">2️⃣
  143. 复制User-Agent</button>
  144. -->
  145. <button style="margin-left:0;margin-top:10px; border-radius: 8px;" id="parseBtn"
  146. class="layui-btn layui-btn-fluid" lay-submit lay-filter="demo-send">2️⃣ 发送到Gopeed</button>
  147. </div>
  148. </div>
  149. </div>
  150. </div>`
  151.  
  152. layui.use(['layer'], async function () {
  153. var layer = layui.layer,
  154. $ = layui.$;
  155. var form = layui.form;
  156. if (location.href.startsWith('https://pan.baidu.com/s/')) {
  157. $('.x-button-box').prepend(
  158. '<a class="g-button" id="downbtn_share" style="background-color: #6800ff;color: #fff;border:none;" href="javascript:;" ><span class="g-button-right"><em style="top:0;" class="icon icon-download" title=""></em><lable class="text" style="width: auto;">' +
  159. wwConfig.titleName +
  160. '</lable></span></a>'
  161. );
  162. } else {
  163. if ($('.tcuLAu').is('*')) {
  164. $('.tcuLAu').prepend(
  165. '<span class="g-dropdown-button"><a id="downbtn_main" style=" margin-right: 10px;color: #fff;background-color: #fc5531;border:none;" id="downbtn_main" class="g-button" ><span class="g-button-right"><em style="top:0;" class="icon icon-download" ></em><lable class="text" style="width: auto;">' +
  166. wwConfig.titleName +
  167. '</lable></span></a></span>'
  168. );
  169. } else {
  170. $('.wp-s-agile-tool-bar__header.is-header-tool').prepend(
  171. '<div class="wp-s-agile-tool-bar__h-group"><button style=" margin-right: 10px;color: #fff;background-color: #ff436a;border:none;" id="downbtn_main" class="u-button nd-file-list-toolbar-action-item" ><i style="top:0;" class="iconfont icon-download"></i> <lable>' +
  172. wwConfig.titleName +
  173. '</lable></button></div>'
  174. );
  175. }
  176. }
  177. $('#downbtn_share').click(function () {
  178. swal({
  179. title: '提示',
  180. text: '请先保存到自己的网盘后,在网盘里解析下载!',
  181. icon: 'warning',
  182. });
  183. return false;
  184. });
  185. $('#downbtn_main').click(function () {
  186. let select = selectList();
  187. let selected = Object.keys(select);
  188. if (selected.length == 0) {
  189. swal({
  190. text: '请先选择一个文件',
  191. icon: 'warning',
  192. });
  193. return false;
  194. } else if (selected.length > 1) {
  195. swal({
  196. text: '目前仅支持单个文件解析',
  197. icon: 'warning',
  198. });
  199. return false;
  200. } else if (select[selected[0]].isdir == 1) {
  201. swal({
  202. text: '目前不支持文件夹解析',
  203. icon: 'warning',
  204. });
  205. return false;
  206. }
  207.  
  208. const openInfoLayer = layer.open({
  209. type: 1,
  210. area: ['550px', 'auto'],
  211. title: '提示',
  212. type: 1,
  213. shade: 0.6,
  214. shadeClose: true,
  215. anim: 0,
  216. content: `
  217. <div class="layui-tab layui-tab-brief" style="background-color: #f8f8f8; border-radius: 8px;">
  218. <ul class="layui-tab-title" style="background-color: #fff; border-bottom: 1px solid #e6e6e6;">
  219. <li class="layui-this">验证码解析</li>
  220. <!-- <li>免费解析</li> -->
  221. <li>防止失联</li>
  222. <li>常见问题反馈</li>
  223. </ul>
  224. <div class="layui-tab-content" style="padding: 20px;">
  225. <div class="layui-tab-item layui-show" style="background-color: #fff; border-radius: 8px; padding: 20px;text-align: center;">
  226. `+ danger_info + `
  227. <div style="margin-bottom: 10px;">(点击跳转:<a style="color: red;font-weight:900;" target="_blank"
  228. href="https://www.wangdu.site/software/tools/948.html">免广告无限制获取验证码</a>)
  229. </div>
  230. <div>
  231. <img src="https://cdn.wwkejishe.top/wp-cdn-02/2024/202411171346351.webp" style="width:200px;height:200px;">
  232. </div>
  233. <h2 class="h2" style="margin-top: 10px;">获取验证码:扫描二维码,复制下面口令并发送</h2>
  234.  
  235. <div class="layui-input-group">
  236. <div class="layui-input-split layui-input-prefix">微信口令验证码:</div>
  237. <input type="text" name="captcha" id="captcha" value="" lay-verify="required" placeholder="请填写口令获取的验证码"
  238. lay-reqtext="请填写验证码" autocomplete="off" class="layui-input" lay-affix="clear">
  239. </div>
  240. <div id="captchaContainer" style="margin:20px 0"></div>
  241. <button style="margin-top:30px; border-radius: 8px;" id="copyWechatBtn"
  242. class="layui-btn layui-btn-fluid layui-bg-red" lay-submit lay-filter="gopeed-set">1️⃣
  243. 复制微信口令</button>
  244. <!-- <button style="margin-left:0;margin-top:10px; border-radius: 8px;" id="parseWxBtn"
  245. class="layui-btn layui-btn-fluid" lay-submit lay-filter="demo-wx-send">2️⃣ 发送到Gopeed</button> -->
  246. <button style="margin-left:0;margin-top:10px; border-radius: 8px;" class="layui-btn layui-btn-fluid" id="submitStableCaptcha">2️⃣ 提交并解析</button>
  247. <button style="margin-left:0;margin-top:10px; border-radius: 8px;" class="layui-btn layui-btn-fluid" id="clearCache">清理缓存</button>
  248. </div>
  249. <div class="layui-tab-item" style="background-color: #fff; border-radius: 8px; padding: 20px;text-align: center;">
  250. <div>
  251. <img src="https://cdn.wwkejishe.top/wp-cdn-02/2024/202411171346351.webp" style="width:240px;height:240px;">
  252. </div>
  253. <h2 class="h2" style="margin-top: 10px;">扫一扫,不失联</h2>
  254. <h3 class="h2" style="margin-top: 10px;">众所周知,脚本不可能每时每刻都能用。关注不迷路 ~</h3>
  255. </div>
  256. <div class="layui-tab-item" style="background-color: #fff; border-radius: 8px; padding: 20px;">
  257. <p class="layui-text">
  258. 常见问题文档: <a style="color:red;" target="_blank"
  259. href="`+ wwConfig.help_document + `">点击查看常见问题</a>(能够解决80%的问题)
  260. </p>
  261. <p>
  262. 好用的话,请给个好评,带上截图就更好了!<a href="https://gf.qytechs.cn/zh-CN/scripts/518023-%E7%99%BE%E5%BA%A6%E7%BD%91%E7%9B%98svip%E9%AB%98%E9%80%9F%E8%A7%A3%E6%9E%90%E7%9B%B4%E9%93%BE%E7%9A%84%E4%B8%8D%E9%99%90%E9%80%9F%E4%B8%8B%E8%BD%BD%E5%8A%A9%E6%89%8B-%E6%96%87%E6%AD%A6pandownload/feedback" target="_blank" style="color: #007bff; text-decoration: none;">点击前往</a>
  263. </p>
  264. <p class="layui-text">
  265. 有问题请带图反馈,我会尽快修复!
  266. </p>
  267. <h2>常见问题</h2>
  268. <p class="layui-text">
  269. 1Edge 浏览器 一直显示解析中 / 无法发送到gopeed / 多次提示:验证码错误<br/>
  270. 答:尝试使用 <a style="color:red;" target="_blank"
  271. href="`+ wwConfig.liulanqi.chrome + `">Google Chrome 浏览器</a>
  272. </p>
  273. <div class="layui-btn-container">
  274. <button style="margin-top:10px; border-radius: 8px;" id="goIssues"
  275. class="layui-btn layui-btn-fluid layui-bg-red" lay-submit lay-filter="gopeed-set">点击前往提交issues</button>
  276. <button style="margin-top:10px; border-radius: 8px;" id="copyAuthorWechat"
  277. class="layui-btn layui-btn-fluid" lay-submit lay-filter="gopeed-set">
  278. 点击复制作者微信号</button>
  279. </div>
  280. </div>
  281. </div>
  282. </div>
  283. `,
  284. success: function () {
  285. // 对弹层中的表单进行初始化渲染
  286. form.render();
  287. // 初始化稳定解析标签页的验证码
  288. loadStableCaptcha();
  289. let token = GM_getValue('token');
  290. if (!token) {
  291. $('#captchaContainer').html(`<div class="layui-col-xs7">
  292. <div class="layui-input-wrap">
  293. <input type="text" id="stableCaptcha" placeholder="输入图片验证码" class="layui-input">
  294. </div>
  295. </div>
  296. <div class="layui-col-xs5">
  297. <div style="margin-left: 10px;">
  298. <img id="captchaImage" style="border:1px solid #ddd;margin-bottom:10px;height:40px;cursor:pointer;">
  299. </div>
  300. </div>`);
  301. }
  302. // 表单提交事件
  303. form.on('submit(demo-send)', async function (data) {
  304. $('#parseBtn').html('<p>正在发送中,请稍后...</p>');
  305. let testDown = await testSendToGopeed();
  306. if (!testDown) {
  307. layer.close(openInfoLayer);
  308. gospeedDownload();
  309. $('#parseBtn').html('<p>发送到Gopeed</p>');
  310. return;
  311. }
  312. let one_url = wwConfig.mainUrl + '/wp/getCodeNum';
  313. share_one_baidu(openInfoLayer, one_url, wwConfig.one_parse.code, wwConfig.one_parse.version, 1);
  314. });
  315.  
  316. $('#parseWxBtn').on('click', async function () {
  317. let captchaStr = $('#captcha').val();
  318. if (captchaStr) {
  319. let lastCaptcha = GM_getValue('lastCaptcha', '');
  320. if (captchaStr === lastCaptcha) {
  321. layer.msg('验证码已使用,请获取新的验证码');
  322. return;
  323. }
  324. GM_setValue('lastCaptcha', captchaStr);
  325. $('#parseWxBtn').html('<p>正在发送中,请稍后...</p>');
  326. let testDown = await testSendToGopeed();
  327. if (!testDown) {
  328. layer.close(openInfoLayer);
  329. gospeedDownload();
  330. $('#parseWxBtn').html('<p>发送到Gopeed</p>');
  331. return;
  332. }
  333. let one_url = wwConfig.mainUrl + '/wp/getPcCodeNum';
  334. share_one_baidu(openInfoLayer, one_url, captchaStr, wwConfig.wx_parse.version, 2);
  335. } else {
  336. layer.msg('请输入验证码');
  337. }
  338. });
  339.  
  340. // 复制 User-Agent 按钮的事件处理
  341. $('#copyUaBtn').on('click', function () {
  342. copy_text(wwConfig.ua, 'User-Agent');
  343. });
  344. $('#copyWechatBtn').on('click', function () {
  345. copy_text(wwConfig.wechatCode, '微信口令');
  346. })
  347. $('#gopeedSetBtn').on('click', function () {
  348. openUrl(wwConfig.help_document);
  349. })
  350. $('#goIssues').on('click', function () {
  351. openUrl(wwConfig.debug_link);
  352. })
  353. $('#copyAuthorWechat').on('click', function () {
  354. copy_text(wwConfig.authorWechat, '作者微信');
  355. })
  356.  
  357. $('#clearCache').on('click', function () {
  358. GM_deleteValue('token');
  359. layer.msg('已清除缓存');
  360. window.location.reload();
  361. })
  362.  
  363. $('#captchaImage').on('click', function () {
  364. loadStableCaptcha();
  365. })
  366.  
  367. $('#submitStableCaptcha').on('click', async function () {
  368. let captchaStr = $('#captcha').val();
  369. let code = $('#stableCaptcha').val();
  370. let token = GM_getValue('token');
  371. if (!token) {
  372. if (!code) {
  373. layer.msg('图片验证码不能为空!');
  374. return;
  375. }
  376. }
  377. if (captchaStr) {
  378. let lastCaptcha = GM_getValue('lastCaptcha', '');
  379. if (captchaStr === lastCaptcha) {
  380. layer.msg('口令验证码已使用,请获取新的验证码');
  381. return;
  382. }
  383. GM_setValue('lastCaptcha', captchaStr);
  384.  
  385. // $('#parseWxBtn').html('<p>正在发送中,请稍后...</p>');
  386. // let testDown = await testSendToGopeed();
  387. // if (!testDown) {
  388. // layer.close(openInfoLayer);
  389. // gospeedDownload();
  390. // $('#parseWxBtn').html('<p>发送到Gopeed</p>');
  391. // return;
  392. // }
  393. let one_url = wwConfig.mainUrl + '/wp/getPcCodeNum';
  394. if (token) {
  395. share_one_baidu(openInfoLayer, one_url, captchaStr, wwConfig.wx_parse.version, 3);
  396. } else {
  397. let uuid = GM_getValue('captcha_uuid');
  398. GM_xmlhttpRequest({
  399. method: 'POST',
  400. url: `${wwConfig.vipUrl}`,
  401. headers: {
  402. 'Content-Type': 'application/json',
  403. },
  404. data: JSON.stringify({
  405. code: code,
  406. uuid: uuid
  407. }),
  408. onload: function (response) {
  409. const data = JSON.parse(response.responseText);
  410. if (data.status === 'success') {
  411. GM_setValue('token', data.token);
  412. $('#captchaContainer').html(``);
  413. share_one_baidu(openInfoLayer, one_url, captchaStr, wwConfig.wx_parse.version, 3);
  414. } else {
  415. layer.msg(data.message);
  416. loadStableCaptcha();
  417. }
  418. }
  419. });
  420. }
  421.  
  422. } else {
  423. layer.msg('请输入验证码');
  424. }
  425. })
  426. },
  427. });
  428. });
  429. });
  430.  
  431. function gospeedDownload() {
  432. swal({
  433. title: "下载 Gopeed 加速器",
  434. text: '请先安装 Gopeed 并打开运行(点击按钮下载 Gopeed)。',
  435. icon: 'warning',
  436. type: "warning",
  437. confirmButtonText: '点击下载Gopeed',
  438. confirmButtonColor: "#dd6b55",
  439. }).then(function () {
  440. openUrl('');
  441. });
  442. }
  443.  
  444. function openUrl(url) {
  445. window.open(url);
  446. }
  447.  
  448. function selectList() {
  449. var select = {};
  450. var option = [];
  451.  
  452. try {
  453. option =
  454. require('system-core:context/context.js').instanceForSystem.list.getSelected();
  455. } catch (e) {
  456. option = document.querySelector('.wp-s-core-pan').__vue__.selectedList;
  457. }
  458. option.forEach((element) => {
  459. select[element.fs_id] = element;
  460. });
  461. return select;
  462. }
  463.  
  464. function init_parse(code) {
  465. switch (code) {
  466. case 1:
  467. layer.msg('解析中', {
  468. icon: 6,
  469. time: 3000,
  470. });
  471. setTimeout(() => {
  472. $('#parseBtn').html('<p>发送到Gopeed</p>');
  473. $('#parseWxBtn').html('<p>发送到Gopeed</p>');
  474. layer.alert('解析通道比较拥堵,请尝试快速下载!', {
  475. title: '提示',
  476. closeBtn: 0,
  477. btn: ['确定', '前往快速下载'],
  478. btn1: function (index) {
  479. $('#parseWxBtn').html('<p>发送到Gopeed</p>');
  480. layer.close(index);
  481. },
  482. btn2: function (index) {
  483. openUrl(wwConfig.monthCard);
  484. }
  485. });
  486. }, 3000);
  487. break;
  488. case 2:
  489. layer.alert(
  490. '验证码错误,一个验证码只能下载一个文件,请重新获取!',
  491. {
  492. title: '提示',
  493. closeBtn: 0
  494. }, function (index) {
  495. $('#parseWxBtn').html('<p>发送到Gopeed</p>');
  496. layer.close(index);
  497. }
  498. );
  499. break;
  500. case 3:
  501. layer.alert('今日下载次数已达上限,请明天再来下载,或者使用快速下载!', {
  502. title: '提示',
  503. closeBtn: 0,
  504. btn: ['确定', '前往快速下载'],
  505. btn1: function (index) {
  506. $('#parseWxBtn').html('<p>发送到Gopeed</p>');
  507. $('#parseBtn').html('<p>发送到Gopeed</p>');
  508. layer.close(index);
  509. },
  510. btn2: function (index) {
  511. openUrl(wwConfig.monthCard);
  512. }
  513. });
  514. break;
  515. case 4:
  516. layer.alert('解析失败,请升级插件或者使用网页稳定版地址!', {
  517. title: '提示',
  518. closeBtn: 0,
  519. btn: ['确定', '前往快速下载'],
  520. btn1: function (index) {
  521. $('#parseBtn').html('<p>发送到Gopeed</p>');
  522. $('#parseWxBtn').html('<p>发送到Gopeed</p>');
  523. layer.close(index);
  524. },
  525. btn2: function (index) {
  526. openUrl(wwConfig.monthCard);
  527. }
  528. })
  529. break;
  530. case 5:
  531. layer.alert('文件大于 3G,插件暂不支持下载,请使用网页稳定版地址(不限制文件大小)!', {
  532. title: '提示',
  533. closeBtn: 0,
  534. btn: ['前往快速下载'],
  535. btn1: function (index) {
  536. openUrl(wwConfig.monthCard);
  537. layer.close(index);
  538. }
  539. })
  540. break;
  541. default:
  542. wwConfig.one_parse.version = 1;
  543. break;
  544. }
  545.  
  546. }
  547. function share_one_baidu(openInfoLayer, url, code, version, type) {
  548. let select = Object.keys(selectList());
  549. let bdstoken = '';
  550. let data_json = {};
  551. try {
  552. data_json = $('html')
  553. .html()
  554. .match(/(?<=locals\.mset\()(.*?)(?=\);)/)[0];
  555. data_json = JSON.parse(data_json);
  556. wwConfig.username = data_json.username;
  557. bdstoken = data_json.bdstoken;
  558. } catch (e) {
  559. data_json = $('html')
  560. .html()
  561. .match(/(?<=window\.locals\s=\s)(.*?)(?=;)/)[0];
  562. data_json = JSON.parse(data_json);
  563. wwConfig.username = data_json.userInfo.username;
  564. bdstoken = data_json.userInfo.bdstoken;
  565. }
  566.  
  567. wwConfig.data_json = data_json;
  568.  
  569. $.ajax({
  570. type: 'GET',
  571. url: 'https://pan.baidu.com/share/set',
  572. async: true,
  573. data: {
  574. bdstoken: bdstoken,
  575. period: 1,
  576. pwd: wwConfig.bdPassword,
  577. eflag_disable: true,
  578. channel_list: '%5B%5D',
  579. schannel: 4,
  580. fid_list: JSON.stringify(select),
  581. },
  582. dataType: 'json',
  583. success: function (res) {
  584. if (res.show_msg.indexOf('禁止') > -1) {
  585. swal({
  586. text: '该文件禁止分享',
  587. icon: 'error',
  588. });
  589. return false;
  590. } else {
  591. let shorturl = '';
  592. try {
  593. shorturl = res.link.split('/').pop();
  594. } catch (error) {
  595. swal({
  596. text: '初始化准备失败',
  597. icon: 'error',
  598. });
  599. return false;
  600. }
  601. fetch(url, {
  602. method: 'POST',
  603. headers: {
  604. 'Content-Type': 'application/json',
  605. },
  606. body: JSON.stringify({
  607. code: code,
  608. userKey: 'main',
  609. fsId: select[0],
  610. version: version,
  611. }),
  612. })
  613. .then((resp) => resp.json())
  614. .then((res) => {
  615. let laysermsg = layer.msg('正在解析中', {
  616. icon: 6,
  617. time: 10000,
  618. });
  619. if (res.code == 200) {
  620. if ((res.data > 100) || (res.data.data == 100 & res.data.vip == 0) || (res.data.data == 100 & res.data.vip == 1) || (res.data == 50 || res.data.data == 50)) {
  621. let download_url = '';
  622. switch (type) {
  623. case 1:
  624. download_url = wwConfig.mainUrl + '/wp/pc/dlink';
  625. break;
  626. case 2:
  627. download_url = wwConfig.mainUrl + '/wp/fast/pc/dlink';
  628. break;
  629. case 3:
  630. download_url = wwConfig.mainUrl + '/wp/fast/pc/dlink';
  631. break;
  632. }
  633. get_down_list(
  634. shorturl,
  635. wwConfig.bdPassword,
  636. openInfoLayer,
  637. res.data,
  638. laysermsg,
  639. download_url,
  640. type
  641. );
  642. }
  643. else if (res.data == 80 || res.data.data == 80) {
  644. init_parse(1);
  645. }
  646. else if (res.data == 60 || res.data.data == 60) {
  647. init_parse(3);
  648. }
  649. // else if (res.data == 50 || res.data.data == 50) {
  650. // init_parse(2);
  651. // }
  652. else if (res.data.data == 100 || res.data.vip == 0) {
  653. init_parse(3);
  654. }
  655. else {
  656. init_parse(2);
  657. }
  658. } else if (res.code == 500) {
  659. layer.close(openInfoLayer);
  660. layer.close(laysermsg);
  661. init_parse(3);
  662. }
  663. });
  664. }
  665. },
  666. error: function (res) {
  667. swal({
  668. text: '初始化准备请求访问失败',
  669. icon: 'error',
  670. });
  671. },
  672. });
  673. }
  674.  
  675. function copy_text(text, msg) {
  676. navigator.clipboard.writeText(text).then(() => {
  677. layer.msg(msg + ' 已复制到剪贴板');
  678. }).catch(err => {
  679. layer.msg('复制失败,请手动复制:' + text);
  680. });
  681. }
  682.  
  683. async function get_down_list(shorturl, password, openInfoLayer, pwd, laysermsg, downloadUrl, type) {
  684. let ajax_data = {
  685. shorturl: shorturl,
  686. pwd: password,
  687. dir: 1,
  688. root: 1,
  689. userKey: 'main',
  690. };
  691. if (type == 3) {
  692. // ajax_data.dir = "1";
  693. // ajax_data.index = 0;
  694. // ajax_data.root = "1";
  695. password = 'ymta';
  696. }
  697.  
  698. fetch(wwConfig.mainUrl + '/wp/parseCopyLink', {
  699. method: 'POST',
  700. headers: {
  701. 'Content-Type': 'application/json',
  702. },
  703. body: JSON.stringify(ajax_data),
  704. })
  705. .then((resp) => resp.json())
  706. .then((res) => {
  707. if (res.code == 200) {
  708. // const size = parseInt(res.data.data.list[0].size);
  709. // if (size > 3221225472) {
  710. // layer.close(openInfoLayer);
  711. // layer.close(laysermsg);
  712. // $('#parseBtn').html('<p>发送到Gopeed</p>');
  713. // init_parse(5);
  714. // return false;
  715. // }
  716. const requestData = {
  717. fsId: res.data.data.list[0].fs_id,
  718. shareid: res.data.data.shareid,
  719. uk: res.data.data.uk,
  720. sekey: res.data.data.seckey,
  721. randsk: res.data.data.seckey,
  722. fs_ids: [res.data.data.list[0].fs_id],
  723. path: res.data.data.list[0].server_filename,
  724. size: res.data.data.list[0].size,
  725. surl: shorturl,
  726. url: `https://pan.baidu.com/s/${shorturl}`,
  727. userKey: 'main',
  728. pwd: password,
  729. dir: '/',
  730. };
  731. let token = GM_getValue('token');
  732. if (token) {
  733. GM_xmlhttpRequest({
  734. method: 'POST',
  735. url: downloadUrl,
  736. headers: {
  737. 'Content-Type': 'application/json;charset=UTF-8',
  738. 'Authorization': 'Bearer ' + token,
  739. },
  740. data: JSON.stringify(requestData),
  741. onload: function (response) {
  742. const responseData = JSON.parse(response.responseText);
  743. if (responseData.code !== 200) {
  744. layer.close(openInfoLayer);
  745. layer.close(laysermsg);
  746. init_parse(3);
  747. } else {
  748. layer.close(laysermsg);
  749. sendToGopeed(responseData.data.data.urls[0], requestData.path);
  750. }
  751. },
  752. onerror: function (response) {
  753. layer.close(openInfoLayer);
  754. layer.close(laysermsg);
  755. const errorMessage =
  756. JSON.parse(response.responseText).message || '网络错误';
  757. swal({
  758. text: '发送到Gopeed遇到问题了,请刷新重试即可!!',
  759. icon: 'warning',
  760. });
  761. },
  762. });
  763. } else {
  764. GM_xmlhttpRequest({
  765. method: 'POST',
  766. url: downloadUrl,
  767. headers: {
  768. 'Content-Type': 'application/json',
  769. },
  770. data: JSON.stringify(requestData),
  771. onload: function (response) {
  772. const responseData = JSON.parse(response.responseText);
  773. // console.log(responseData);
  774. if (responseData.code !== 200) {
  775. layer.close(openInfoLayer);
  776. layer.close(laysermsg);
  777. // swal({
  778. // text: responseData.msg,
  779. // icon: 'warning',
  780. // });
  781. init_parse(3);
  782. } else {
  783. layer.close(laysermsg);
  784. $('#parseBtn').html('<p>发送到Gopeed</p>');
  785. if (responseData.data.vip) {
  786. wwConfig.url = responseData.data.data.dlink;
  787. wwConfig.ua = responseData.data.data.ua;
  788. } else {
  789. wwConfig.url = responseData.data.dlink;
  790. wwConfig.ua = responseData.data.ua;
  791. }
  792. sendToGopeed(res.data.data.list[0], responseData.path);
  793. }
  794. },
  795. onerror: function (response) {
  796. layer.close(openInfoLayer);
  797. layer.close(laysermsg);
  798. const errorMessage =
  799. JSON.parse(response.responseText).message || '网络错误';
  800. swal({
  801. text: '发送到Gopeed遇到问题了,请刷新重试即可!!',
  802. icon: 'warning',
  803. });
  804. },
  805. });
  806. }
  807. } else {
  808. layer.close(openInfoLayer);
  809. layer.close(laysermsg);
  810. $('#parseBtn').html('<p>发送到Gopeed</p>');
  811. $('#parseWxBtn').html('<p>发送到Gopeed</p>');
  812. swal({
  813. text: '发送到Gopeed遇到问题了,请升级插件刷新重试即可!!',
  814. icon: 'warning',
  815. });
  816. }
  817. });
  818. }
  819. function testSendToGopeed() {
  820. return fetch(wwConfig.goPeedTaskUrl, {
  821. method: 'POST',
  822. headers: {
  823. 'Content-Type': 'application/json'
  824. },
  825. })
  826. .then((resp) => resp.json())
  827. .then((res) => {
  828. return true;
  829. }).catch(e => {
  830. return false;
  831. })
  832. }
  833. function sendToGopeed(item, fileName) {
  834. let download_url = item.url ? item.url : item.dlink;
  835. let data = {
  836. req: {
  837. url: download_url,
  838. extra: {
  839. header: {
  840. "User-Agent": null,
  841. }
  842. }
  843. },
  844. opt: {
  845. extra: {
  846. connections: 256,
  847. }
  848. }
  849. }
  850. fetch(wwConfig.goPeedTaskUrl, {
  851. method: 'POST',
  852. headers: {
  853. 'Content-Type': 'application/json'
  854. },
  855. body: JSON.stringify(data),
  856. }).then((resp) => resp.json())
  857. .then((res) => {
  858. layer.open({
  859. // content: `请打开 Gopeed 查看 <span style="color:rgba(5,150,105,1);">${fileName}</span> 是否开始下载?未下载成功,先设置IDM/NDM User-Agent:<code>` + wwConfig.ua + `</code>,再复制直链下载!(暂时只支持 Gopeed 下载!)`,
  860. // btn: ['已下载,关闭弹窗', '复制UA', '未下载,复制直链'],
  861. content: `请打开 Gopeed 查看 <span style="color:rgba(5,150,105,1);">${fileName}</span> 是否开始下载?未下载成功,请重试!(暂时只支持 Gopeed 下载!)`,
  862. btn: ['已下载,关闭弹窗', '未下载,复制直链'],
  863. closeBtn: 0,
  864. type: 1,
  865. btn1: function (index, layero, that) {
  866. layer.close(index);
  867. $('#parseWxBtn').html('<p>发送到Gopeed</p>');
  868. loadStableCaptcha();
  869. },
  870. // btn2: function (index, layero, that) {
  871. // GM_setClipboard(wwConfig.ua, "text");
  872. // layer.msg('UA复制成功!');
  873. // return false;
  874. // },
  875. btn2: function (index, layero, that) {
  876. GM_setClipboard(download_url, "text");
  877. layer.msg(`${fileName} 的直链复制成功!`);
  878. $('#parseWxBtn').html('<p>发送到Gopeed</p>');
  879. loadStableCaptcha();
  880. }
  881. });
  882. }).catch(e => {
  883. })
  884. }
  885.  
  886. function loadStableCaptcha() {
  887. GM_xmlhttpRequest({
  888. method: 'GET',
  889. url: `${wwConfig.vipUrl}`,
  890. onload: function (response) {
  891. const data = JSON.parse(response.responseText);
  892. if (data.status === 'success') {
  893. $('#captchaImage').attr('src', 'data:image/jpeg;base64,' + data.img);
  894. GM_setValue('captcha_uuid', data.uuid);
  895. }
  896. }
  897. });
  898. }
  899.  
  900. setInterval(() => {
  901. GM_xmlhttpRequest({
  902. method: 'get',
  903. url: wwConfig.goPeedTaskUrl + '?status=running',
  904. headers: {
  905. 'Content-Type': 'application/json',
  906. },
  907. onload: function (response) {
  908. const responseData = JSON.parse(response.responseText);
  909. const result = responseData.data.filter(e =>
  910. e.status === "running"
  911. ).filter((e) => e.progress.speed < 1048576).map(e => e.id);
  912. const ids = result.map((e) => {
  913. return `id=${e}`
  914. }).join('&')
  915. if (ids && ids.length) {
  916. GM_xmlhttpRequest({
  917. method: 'put',
  918. url: `${wwConfig.goPeedTaskUrl}/pause?${ids}`,
  919. headers: {
  920. 'Content-Type': 'application/json',
  921. },
  922. onload: function (response) {
  923. GM_xmlhttpRequest({
  924. method: 'put',
  925. url: `${wwConfig.goPeedTaskUrl}/continue?${ids}`,
  926. headers: {
  927. 'Content-Type': 'application/json',
  928. },
  929. onload: function (response) {
  930. }
  931. })
  932. }
  933. })
  934. }
  935. }
  936. })
  937. }, 15000)
  938.  
  939. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址