![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 来批量读取和操作网盘文件信息, 获取目录的文件信息,模拟浏览器的脚本操作来发送网络请求
这个代码库是百度网盘批量清理重复文件计划
的一部分。
模拟浏览器脚本操作,使用 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
类型
然后刷新页面,点击下方的
https://pan.baidu.com/api/list
一行,右键选择copy
,copy request headers
,获得其中的cookie
获得如下内容
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
fetch-baidu-pan-files-api "--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"
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);
百度网盘 api 更新到 v2 了,没有 bdstoken 了,换成 csrf,并放入了 cookie 当中.
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.