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 doctor --provider boss --skip-control
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.2.tar.gz
(104.8 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.2-py3-none-any.whl
(108.0 kB
view details)
File details
Details for the file yongle_worker-0.1.2.tar.gz.
File metadata
- Download URL: yongle_worker-0.1.2.tar.gz
- Upload date:
- Size: 104.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a8e46c3f0b8db00e92695acf26a2748c5fe1a8956eb2d83c421bc9d67f5db3c7
|
|
| MD5 |
b9899aaada304d0711975ae15dc89a57
|
|
| BLAKE2b-256 |
cc2b2150526c7620eaac6cdd317618348366f2752d023715ac27b05b3b602115
|
File details
Details for the file yongle_worker-0.1.2-py3-none-any.whl.
File metadata
- Download URL: yongle_worker-0.1.2-py3-none-any.whl
- Upload date:
- Size: 108.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 |
d4894c723ae963ec1bfefe1dfaa8e38f0ffa02339673b8e104b7d354e3e157fd
|
|
| MD5 |
be8bb02c82e8bb1d10bb5b514b722060
|
|
| BLAKE2b-256 |
f0f7636c7a0494426b036594d28184140f7063a0c0e9ee209da4f48f159eedf4
|