配置Aria2>>
// ==UserScript== // @name 2025最新可用-百度网盘不限制下载-神速Down(支持整个文件夹下载) // @namespace https://github.com/AFANOOO/sspan // @version 9.9.3 // @icon https://s2.loli.net/2025/04/19/dwVq7tx9NBgvfaz.png // @author GreasyFork // @description 2025持续更新可用的.不限制速度文件夹下载的百度网盘解析脚本,无视黑号,拥有IDM/Aria2/Motrix三种方式任意体验极速下载!支持Microsoft Edge、Google Chrome、Firefox等浏览器 面向所有网友免费交流学习使用,更多功能正在完善中... // @antifeature ads // @antifeature membership // @antifeature tracking // @license MIT // @match *://pan.baidu.com/* // @match *://yun.baidu.com/* // @match *://pan.baidu.com/disk/main* // @match *://yun.baidu.com/disk/main* // @match *://pan.baidu.com/s/* // @match *://yun.baidu.com/s/* // @match *://pan.baidu.com/share/* // @match *://yun.baidu.com/share/* // @homepage https://ass.sshezu.cn // @supportURL https://ass.sshezu.cn // @connect localhost // @connect 127.0.0.1 // @connect baidu.com // @connect * // @require https://lib.baomitu.com/jquery/3.7.1/jquery.js // @require https://lib.baomitu.com/layui/2.9.3/layui.min.js // @require https://lib.baomitu.com/limonte-sweetalert2/11.10.2/sweetalert2.all.min.js // @require https://lib.baomitu.com/layui/2.9.3/layui.js // @resource customCSS https://lib.baomitu.com/layui/2.9.3/css/layui.css // @grant GM_xmlhttpRequest // @grant GM_addStyle // @grant GM_getResourceText // @run-at document-idle // @grant unsafeWindow // @connect oa.assco.cn // @connect jiexi.ssoos.cc // @connect pro.ssoos.cc // ==/UserScript== ;(async function () { if (window.top !== window) return if (location.href.indexOf('yun.baidu.com') > -1) { location.href = location.href.replace('yun.baidu.com', 'pan.baidu.com') return } const closepng = 'https://s2.loli.net/2025/04/19/ePHoOl3tz2YyIUr.png' const errorpng = 'https://s2.loli.net/2025/04/19/XPJUvmpOQdGc9lB.png' const css = GM_getResourceText('customCSS') GM_addStyle(css) if (!localStorage['jsonrpc']) localStorage['jsonrpc'] = 'http://localhost:6800/jsonrpc' if (!localStorage['savePath']) localStorage['savePath'] = 'D:\\SSDOWN' $('head').append(``) $('body').append( `
`, ) async function fetchFolderPage(dir, page = 1) { try { const res = await fetch(`https://pan.baidu.com/api/list?clienttype=0&app_id=250528&web=1&order=time&desc=1&num=100&dir=${encodeURIComponent(dir)}&page=${page}`) const json = await res.json() if (json.errno !== 0) { console.error(`❌ 错误获取目录 ${dir}:`, res, json) return [] } return json.list || [] } catch (err) { console.error(`⚠️ 网络错误: ${dir} page ${page}:`, err.message) return [] } } async function fetchAllInFolder(dir) { let allItems = [] let page = 1 let hasMore = true while (hasMore) { const items = await fetchFolderPage(dir, page) if (items.length === 0) break allItems.push(...items) hasMore = items.length === 100 page++ } return allItems } async function collectAllFiles(files) { const allFiles = [] async function recurse(file) { const files = await fetchAllInFolder(file.path) for (const file of files) { if (file.isdir == 1) { await recurse(file) } else { allFiles.push(file) } } } for (const file of files) { if (file.isdir == 1) { await recurse(file) } else { allFiles.push(file) } } return allFiles } async function getSelectedList() { const selectedList = document.querySelector('.wp-s-core-pan').__vue__.selectedList return await collectAllFiles(selectedList) } function request(url, type = 'byte') { return new Promise((resolve) => { GM_xmlhttpRequest({ method: 'GET', url, responseType: 'arraybuffer', onload: function (response) { if (response.status === 200) { if (type != 'byte') { resolve(response.responseText) return } var arr = new Uint8Array(response.response) resolve(arr) } else { resolve() } }, onerror: function (error) { resolve() }, }) }) } const isNPage = function () { if (document.location.href.indexOf('.baidu.com/disk/main') > 0) { return true } return false } const isSharePage = function () { let pathurl = document.location.pathname.replace('/disk/', '') if (/^\/(s|share)\//.test(pathurl)) { return true } return false } const getCurType = function () { if (isNPage()) return 'new' if (isSharePage()) return 'share' return '' } const curType = getCurType() const copy = (text) => { const el = document.createElement('textarea') el.value = text document.body.appendChild(el) el.select() document.execCommand('copy') document.body.removeChild(el) } setInterval(function () { if ($('.layui-layer-close2').length > 0) $('.layui-layer-close2').html(`欢迎使用本项目!请阅读并同意以下声明:
本项目不会存储您的共享链接与提取密码,仅用于获取文件列表。(如不放心,您可以使用后取消或修改提取密码)
仅用于个人研究学习使用,请勿违法用处,否则后果自负!(请勿解析黄色文件,以及其他违法文件,一旦发现禁用IP地址+禁用授权密钥公布使用者QQ)
当前文件
加载中...
选项 ->下载->用户代理(UA) ->填入复制UA的内容-在IDM新建任务,粘贴链接即可。
点击 推送到 Aria2(Motrix)将自动下载,支持Windows/MAC客户端需要手动设置保存路径。
${linkResponseJson?.quota_message ?? ''}`, icon: 'error', }) break } if (linkResponseJson.message.includes('-20') || !linkResponseJson.data) { i-- continue } links.push(...linkResponseJson.data) quotaMessage = linkResponseJson.quota_message } console.log('links=====>', links) if (!isBreak) { Swal.fire({ title: '解析成功', html: `
${quotaMessage}`, icon: 'success', }) } if (links.length > 0) { $('#copy').removeClass('layui-btn-disabled') $('#pusharia').removeClass('layui-btn-disabled') $('#copyUa').removeClass('layui-btn-disabled') } layer.closeAll('loading') $('#loadingtext').hide() } async function sendAria2() { layer.load(2, { shade: [0.3, '#FFF'], }) let rpcDir = $('#dialogTxtSavePath').val().replace(/\\/g, '/') let rpcHostUrl = $('#dialogAriaRPC').val() let rpcToken = $('#dialogAriaToken').val() try { links.forEach((link) => { link.dir = selectedItems.find((item) => item.fs_id === link.fs_id)?.path ?? '' GM_xmlhttpRequest({ method: 'POST', responseType: 'json', timeout: 3000, url: rpcHostUrl, data: JSON.stringify({ id: 'shensuDown', jsonrpc: '2.0', method: 'aria2.addUri', params: [ `token:${rpcToken}`, [link.url], { "max-connection-per-server": "4", split: "4", "max-overall-download-limit": "10M", "max-concurrent-downloads": "4", dir: rpcDir, out: link.dir, 'user-agent': link.ua, }, ], }), onload: function (res) { if (res.status === 200) { if (!res.response.result) { Swal.fire({ title: '系统提示', html: '发生错误,没有找到该端口/路径的下载器 请检查PRC是否正确或已打开下载器!', icon: 'error', }) } } else { Swal.fire({ title: '系统提示', html: '发生错误,没有找到该端口/路径的下载器 请检查PRC是否正确或已打开下载器!', icon: 'error', }) } }, ontimeout: (res) => { Swal.fire({ title: '系统提示', html: '连接到RPC服务器超时:请检查推送前Aria2/Motrix是否正在运行, RPC已连接? RPC配置是否正确!若是远程下载器请你配置内网穿透!或取消Token推送!', icon: 'error', }) }, onerror: (res) => { Swal.fire({ title: '系统提示', html: '发送至Aria2/Motrix时发生错误,请重试!推送前检查Aria2/Motrix是否正在运行,RPC已连接? RPC配置是否正确!若是远程下载器请你配置内网穿透!或取消Token推送!' + res.responseText, icon: 'error', }) }, }) $('#loadingtext').hide() layer.closeAll('loading') }) } catch (error) { $('#loadingtext').hide() layer.closeAll('loading') console.log(error) Swal.fire({ title: '系统提示', html: '发生错误,请刷新页面重试!', icon: 'error', }) } Swal.fire({ title: '系统提示', html: `推送成功!快去看看吧 若下载失败请检查保存文件路径有无配置,关闭您的代理下载!