Yongle local data collection CLI
Project description
yongle-worker
yongle-worker 是永乐数据平台的本地采集 CLI。采集任务在你的电脑上执行,平台账号用于登录、余额校验和任务结算。
安装
pip install yongle-worker
建议使用 Python 3.10 或更高版本。
快速开始
启动交互模式:
yongle-worker
登录账号:
/login YOUR_API_KEY
公网服务地址已内置,正常使用不需要额外配置。
查看可用模型:
yongle-worker run --list-models
运行携程采集:
yongle-worker run --model 携程 --city 杭州 --pages 3 --items 20 --comments 5
运行 BOSS 采集:
yongle-worker auth boss import-browser --browser auto
yongle-worker run --model Boss直聘 --keyword 爬虫工程师 --city 上海 --pages 2
常用命令
yongle-worker
yongle-worker run --list-models
yongle-worker run --interactive
yongle-worker doctor
yongle-worker auth boss import-browser --browser auto
说明:
run:正式任务入口,执行前会展示任务预览和预计点数。run --interactive:按步骤填写任务参数。doctor:检查本机运行环境和账号状态。auth boss import-browser:从本机浏览器导入 BOSS 登录态,用于本机采集。
登录与本地数据
- CLI 默认连接永乐数据公网服务,不需要额外配置服务地址。
- API Key 只用于当前设备登录和任务结算,请不要发给他人。
- 登录态默认保存在本机,并尽量使用本机加密能力保护。
- BOSS Cookie 只用于本机采集,不需要手动粘贴到平台页面。
- 如不想保存本机登录态,可设置
YONGLE_PERSIST_LOGIN_SESSION=0。
常见问题
401 或 API Key 无效
确认 API Key 是否复制完整,并重新执行:
/login YOUR_API_KEY
余额不足
减少任务页数、条数或评论数,或先完成充值后重试。
BOSS 任务提示未登录
先在本机浏览器登录 BOSS,再执行:
yongle-worker auth boss import-browser --browser auto
网络连接失败
执行:
yongle-worker doctor
如果只是临时网络问题,稍后重试即可。
隐私边界
- 采集过程在用户本机执行。
- 请只在你有合法授权的场景下使用本工具。
- 不要在公开聊天、截图或工单中暴露 API Key、浏览器 Cookie、验证码、支付订单号等敏感信息。
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
yongle_worker-0.1.5.tar.gz
(105.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
yongle_worker-0.1.5-py3-none-any.whl
(109.0 kB
view details)
File details
Details for the file yongle_worker-0.1.5.tar.gz.
File metadata
- Download URL: yongle_worker-0.1.5.tar.gz
- Upload date:
- Size: 105.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
18a19c46aafc7aba17bf8ac421cf353c6a7fbafd3b15824a92a120b9f41f2e03
|
|
| MD5 |
deb21e41472c288b75809d4445cc9c99
|
|
| BLAKE2b-256 |
ebde28faf8b087ad84ec6efd2652190428ab610ef634f37b95dc9eb2f6532769
|
File details
Details for the file yongle_worker-0.1.5-py3-none-any.whl.
File metadata
- Download URL: yongle_worker-0.1.5-py3-none-any.whl
- Upload date:
- Size: 109.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b6296fa2b021818ac8cf33ac3c7a171b6c041b5c1c00818ec4ca6e51fb4fbdc3
|
|
| MD5 |
7371af658c1469f6ff7f19df97bdd70a
|
|
| BLAKE2b-256 |
81b603c60ebd1acee232ba3200990f86013e8a4f66319a437fbd1b17ed5469e0
|