![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@masx200/fetch-baidu-pan-files-api
Advanced tools
模拟浏览器脚本操作,使用 nodejs 来批量读取和操作网盘文件信息, 获取目录的文件信息,模拟浏览器的脚本操作来发送网络请求
bduss
的方法http://tool.cccyun.cc/tool/bduss/index3.html
https://bduss.lingtings.com/index3.html
这个代码库是百度网盘批量清理重复文件计划
的一部分。
模拟浏览器脚本操作,使用 nodejs
来批量读取和操作网盘文件信息
获取目录的文件信息,模拟浏览器的脚本操作来发送网络请求
还提供了直接获取指定目录下的所有文件信息的功能,若遇到网络错误自动重试
还提供了直接删除指定的批量文件的功能,多次尝试,判断要删除的文件是否存在
网盘对于每次删除操作的文件数有限制,故只能拆分多次尝试删除,轮询任务完成状态
https://github.com/masx200/baidu-pan-delete-repeated-files
https://github.com/masx200/fetch-baidu-pan-files-api
https://github.com/masx200/fetch-file-list-to-mongodb
https://github.com/masx200/mongodb-file-find-md5-repeat
yarn global add @masx200/fetch-baidu-pan-files-api
node_modules
yarn install
yarn build
yarn start
cookie
使用浏览器登陆百度网盘的网页版,并登陆
https://pan.baidu.com/
然后按F12
打开浏览器的devtools
点击network
页,选择监视Doc
类型
然后刷新页面,点击下方的home
一行,右键选择copy
,copy request headers
获得如下内容
Cookie: BAIDUID=xxx; pan_login_way=xxx; PANWEB=xxx; BIDUPSID=xxx; PSTM=xxx; cflag=xxx; BDCLND=xxx; BDUSS=xxx; STOKEN=xxx; SCRC=xxx; Hm_lvt_7a3960b6f067eb0085b7f96ff5e660b0=xxx; Hm_lpvt_7a3960b6f067eb0085b7f96ff5e660b0=xxx; PANPSC=xxx
提取出其中Cookie:
后的内容为 cookie
cookie
,并解析 cookie
bdstoken
使用浏览器登陆百度网盘的网页版,并登陆
https://pan.baidu.com/
点击右键菜单,点击查看页面源代码
然后搜索bdstoken
找到locals.set('bdstoken', 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx');
提取出 "bdstoken"
之后的内容为bdstoken
fetch-baidu-pan-files-api --bdstoken=3789cf378cf79ea16dd4310a11afad68 "--cookie=BIDUPSID=C7CAB23C40776BF5E48C67310FD01E74; PSTM=1590808841; BAIDUID=C7CAB23C40776BF5213C5AE187C386C6:FG=1; PANWEB=1; pan_login_way=1; BDCLND=uu57jGT9ElzGWAeaeVEZc0LjXMLt9w2JqQgKARJ5b1Y%3D; BDUSS=3NKUDRHZ1lMMkpILU0ybllPZDJtTWIxWGs2WXRvS1lQZC1SU1VJV0JDQUtScDFmSUFBQUFBJCQAAAAAAAAAAAEAAADPRYIEbWFzeDIwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAq5dV8KuXVfM; BDUSS_BFESS=3NKUDRHZ1lMMkpILU0ybllPZDJtTWIxWGs2WXRvS1lQZC1SU1VJV0JDQUtScDFmSUFBQUFBJCQAAAAAAAAAAAEAAADPRYIEbWFzeDIwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAq5dV8KuXVfM; STOKEN=6e7b5cea4d59e1967142508f57990b4218c2d38c93070a646e3493ad0401dcf7; SCRC=c5353cef847fc068755a7759062f12f7; Hm_lvt_7a3960b6f067eb0085b7f96ff5e660b0=1599360119,1601538650,1601540146,1601550607; Hm_lpvt_7a3960b6f067eb0085b7f96ff5e660b0=1601550607; PANPSC=1263501417102908774%3AKkwrx6t0uHDoTFmRfJVxoMJKt428qvGu%2B%2FtD9xp6N5gr2wqYbSNJzI%2BMN1l%2FFuMgUCTN6WhC3i%2FKGWKyBagKrmlUQ2zB5GaPDtTCc6ZqWjGu2cUHmw770eVcjWJ40Swp0v29HoOyBxO7W09FU%2BvrLt8NRd7EA5d%2B2fNZfjs7wBY%2FcoIBUQpA2juoAeCl9TBG"
https://github.com/masx200/fetch-baidu-pan-files-api/tree/master/api
import { listonedir } from "@masx200/fetch-baidu-pan-files-api";
listonedir("/path/to/your/dir").then(console.log);
import { listdirpage } from "@masx200/fetch-baidu-pan-files-api";
listdirpage("/path/to/your/dir", 1).then(console.log);
import { deletefiles } from "@masx200/fetch-baidu-pan-files-api";
deletefiles(["/path/to/your/file1", "/path/to/your/file2"]).then(console.log);
import { fetchdeletetaskid } from "@masx200/fetch-baidu-pan-files-api";
fetchdeletetaskid(["/path/to/your/file1", "/path/to/your/file2"]).then(
console.log
);
import { taskquerydeleteonce } from "@masx200/fetch-baidu-pan-files-api";
taskquerydeleteonce(278400522319194).then(console.log);
import { taskquerydeletepoll } from "@masx200/fetch-baidu-pan-files-api";
taskquerydeletepoll(278400522319194).then(console.log);
FAQs
模拟浏览器脚本操作,使用 nodejs 来批量读取和操作网盘文件信息, 获取目录的文件信息,模拟浏览器的脚本操作来发送网络请求
We found that @masx200/fetch-baidu-pan-files-api demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.