把 115 网盘的文件列表导出到数据库
安装
你可以通过 pypi 安装
pip install -U p115updatedb
用法
模块
from p115updatedb import updatedb_life_iter, updatedb_life, updatedb, updatedb_one, updatedb_tree
另外也提供了一些工具函数,封装了一些数据库查询
from p115updatedb.query import *
命令行
$ p115updatedb -h
usage: p115updatedb [-h] [-cp COOKIES_PATH] [-f DBFILE] [-i INTERVAL]
[-st AUTO_SPLITTING_THRESHOLD]
[-sst AUTO_SPLITTING_STATISTICS_TIMEOUT] [-nm] [-nr] [-de]
[-v] [-l]
[dir ...]
遍历 115 网盘的目录,并把信息导出到数据库
positional arguments:
dir 115 目录,可以传入多个,如果不传默认为 0
允许 3 种类型的目录
1. 整数,视为目录的 id
2. 形如 "/名字/名字/..." 的路径,最前面的 "/" 可以省略,本程序会尝试获取对应的 id
3. 形如 "根目录 > 名字 > 名字 > ..." 的路径,来自点击文件的【显示属性】,在【位置】这部分看到的路径,本程序会尝试获取对应的 id
options:
-h, --help show this help message and exit
-cp COOKIES_PATH, --cookies-path COOKIES_PATH
cookies 文件保存路径,默认为当前工作目录下的 115-cookies.txt
-f DBFILE, --dbfile DBFILE
sqlite 数据库文件路径,默认为在当前工作目录下的 f'115-{user_id}.db'
-i INTERVAL, --interval INTERVAL
两个任务之间的睡眠时间,如果 <= 0,则不睡眠
-st AUTO_SPLITTING_THRESHOLD, --auto-splitting-threshold AUTO_SPLITTING_THRESHOLD
自动拆分的文件数阈值,大于此值时,自动进行拆分,如果 = 0,则总是拆分,如果 < 0,则总是不拆分,默认值 100,000(10 万)
-sst AUTO_SPLITTING_STATISTICS_TIMEOUT, --auto-splitting-statistics-timeout AUTO_SPLITTING_STATISTICS_TIMEOUT
自动拆分前的执行文件数统计的超时时间(秒),大于此值时,视为文件数无穷大,如果 <= 0,视为永不超时,默认值 3
-nm, --no-dir-moved 声明没有目录被移动或改名(但可以有目录被新增或删除),这可以加快批量拉取时的速度
-nr, --not-recursive 不遍历目录树:只拉取顶层目录,不递归子目录
-de, --disable-event 关闭 event 表的数据收集
-v, --version 输出版本号
-l, --license 输出开源协议
Metadata
Release files for p115updatedb 0.0.12.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| p115updatedb-0.0.12.4.tar.gz | 45.8 kB | Without provenance | Details for p115updatedb-0.0.12.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| p115updatedb-0.0.12.4-py3-none-any.whl | Python 3 | none | any | Details for p115updatedb-0.0.12.4-py3-none-any.whl |
Total release size: 95.8 kB
Release files / p115updatedb-0.0.12.4.tar.gz
| Download URL | p115updatedb-0.0.12.4.tar.gz |
|---|---|
| Size | 45.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
66bf52e9d290d0ffcded6b39ace9e2d8c36510ab302cf7629785ffcb856cabef
|
|
BLAKE2b-256 checksum How to use checksums |
e5eae45f93057669e2c8eaec2f073f1754c50f3ea689912324f4ba887341192f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.2.1 CPython/3.13.5 Darwin/25.0.0
|
Release files / p115updatedb-0.0.12.4-py3-none-any.whl
| Download URL | p115updatedb-0.0.12.4-py3-none-any.whl |
|---|---|
| Size | 50.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8e29d6e02d47a79c29f1def0223ff3f2f28b2d3646e48f238472c8a0e3addc50
|
|
BLAKE2b-256 checksum How to use checksums |
3e64a950a4887784bcefa3e814c5a46a5316692f97a8e2939c8ca41c436ba11f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.2.1 CPython/3.13.5 Darwin/25.0.0
|
Security for p115updatedb 0.0.12.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.