Skip to main content

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

如果只是临时网络问题,稍后重试即可。

官方交流

  • QQ 群:1093291830

隐私边界

  • 采集过程在用户本机执行。
  • 请只在你有合法授权的场景下使用本工具。
  • 不要在公开聊天、截图或工单中暴露 API Key、浏览器 Cookie、验证码、支付订单号等敏感信息。

Project details


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.6.tar.gz (105.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

yongle_worker-0.1.6-py3-none-any.whl (108.4 kB view details)

Uploaded Python 3

File details

Details for the file yongle_worker-0.1.6.tar.gz.

File metadata

  • Download URL: yongle_worker-0.1.6.tar.gz
  • Upload date:
  • Size: 105.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for yongle_worker-0.1.6.tar.gz
Algorithm Hash digest
SHA256 1fb2b238cb8784cb8b9358aee6f648ff5887a1dc6c458b5fc8e57fdf87d3efc2
MD5 af77a9bd5c2f9ed9e1293a8907874763
BLAKE2b-256 2fa757fa8f92bf1e9767260a081b399fc3d4c4aedfea7a82719e8563ff7a4ebd

See more details on using hashes here.

File details

Details for the file yongle_worker-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: yongle_worker-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 108.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for yongle_worker-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 b4c59bb15cfdba06ddd40e8d91bfc2a3a0489195f8fdc763306f2ae919e4aea0
MD5 d2b49aab64bd34ba6057383b914a932e
BLAKE2b-256 ebc30fbdbc69a4ebbb6dc8cb1e948fc18a6d92f46566f3d0ac88ef2d13c15adf

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page