{"id":13488591,"url":"https://github.com/tychxn/jd-assistant","last_synced_at":"2025-05-14T11:12:51.906Z","repository":{"id":37335949,"uuid":"136332816","full_name":"tychxn/jd-assistant","owner":"tychxn","description":"京东抢购助手：包含登录，查询商品库存/价格，添加/清空购物车，抢购商品(下单)，查询订单等功能","archived":false,"fork":false,"pushed_at":"2024-01-05T18:00:51.000Z","size":6998,"stargazers_count":5170,"open_issues_count":57,"forks_count":1919,"subscribers_count":108,"default_branch":"master","last_synced_at":"2024-10-29T15:35:06.753Z","etag":null,"topics":["assistant","buy","jd","jingdong","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tychxn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-06-06T13:29:23.000Z","updated_at":"2024-10-29T03:26:11.000Z","dependencies_parsed_at":"2024-07-31T20:53:15.074Z","dependency_job_id":"db8a751a-fc09-475a-82cb-be2f706533c6","html_url":"https://github.com/tychxn/jd-assistant","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tychxn%2Fjd-assistant","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tychxn%2Fjd-assistant/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tychxn%2Fjd-assistant/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tychxn%2Fjd-assistant/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tychxn","download_url":"https://codeload.github.com/tychxn/jd-assistant/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247092372,"owners_count":20882217,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["assistant","buy","jd","jingdong","python3"],"created_at":"2024-07-31T18:01:18.534Z","updated_at":"2025-04-03T23:03:46.373Z","avatar_url":"https://github.com/tychxn.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# JD-Assistant\n\n[![version](https://img.shields.io/badge/python-3.4+-blue.svg)](https://www.python.org/download/releases/3.4.0/) \n[![status](https://img.shields.io/badge/status-stable-green.svg)](https://github.com/tychxn/jd-assistant)\n[![license](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE)\n[![star, issue](https://img.shields.io/badge/star%2C%20issue-welcome-brightgreen.svg)](https://github.com/tychxn/jd-assistant)\n\n京东抢购助手（短期内不再更新）\n\n## 主要功能\n\n- 登陆京东商城（[www.jd.com](http://www.jd.com/)）\n  - 手机扫码登录\n  - 保存/加载登录cookies (可验证cookies是否过期)\n- 商品查询操作\n  - 提供完整的[`地址⇔ID`](./area_id/)对应关系\n  - 根据商品ID和地址ID查询库存\n  - 根据商品ID查询价格\n- 购物车操作\n  - 清空/添加购物车 (无货商品也可以加入购物车，预约商品无法加入)\n  - 获取购物车商品详情\n- 订单操作\n  - 获取订单结算页面信息 (商品详情, 应付总额, 收货地址, 收货人等)\n  - 提交订单（使用默认地址）\n    - 直接提交\n    - 有货提交\n    - 定时提交\n  - 查询订单 (可选择只显示未付款订单)\n- 其他\n  - 商品预约\n  - 用户信息查询\n\n## 运行环境\n\n- [Python 3](https://www.python.org/)\n\n## 第三方库\n\n- [Requests](http://docs.python-requests.org/en/master/)\n- [Beautiful Soup](https://www.crummy.com/software/BeautifulSoup/bs4/doc/)\n- [PyCryptodome](https://github.com/Legrandin/pycryptodome)\n\n安装：\n```sh\npip install -r requirements.txt\n```\n\n## 使用教程\n\n程序主入口在 `main.py`\n\n👉 [使用教程请参看Wiki](https://github.com/tychxn/jd-assistant/wiki/1.-%E4%BA%AC%E4%B8%9C%E6%8A%A2%E8%B4%AD%E5%8A%A9%E6%89%8B%E7%94%A8%E6%B3%95)\n\n\n## 更新记录\n\n- 【2020.03.10】修复了一些小问题。\n- 【2020.02.08】修复了查询库存接口响应数据结构变化导致的问题。\n- 【2020.02.06】添加下单成功消息推送功能；新增配置参数以减少各种异常情况。\n- 【2020.02.03】查询商品库存方法添加超时，避免少数情况下的卡死问题；对部分代码进行了优化。\n- 【2020.02.02】重写了监控库存提交订单功能：监控多商品时可以下单任一有库存商品，具体使用方式请参考wiki。\n- 【2020.01.29】修复了自定义商品数量时的bug。\n- 【2020.01.28】完善了监控库存提交订单功能的代码，具体使用方式请参考wiki。\n- 【2020.01.24】修复了查询单个商品库存接口需要添加额外参数的问题。\n- 【2020.01.15】提升了部分代码质量。\n- 【2019.12.14】解决查询单个商品库存接口变动的问题。\n- 【2019.11.10】临时增加预约商品抢购功能。\n- 【2019.02.16】更新了普通商品的抢购代码，在Wiki中写了一份使用教程。\n- 【2018.11.29】京东更新了抢购商品的下单接口，代码已更新，支持定时抢购。\n- 【2018.09.26】京东已下线`字符验证码`接口，`账号密码登录`功能失效，请使用扫码登录`asst.login_by_QRcode()`。\n- 【2018.07.28】京东已采用`滑动验证码`替换登录时出现的`字符验证码`，但还没有下线`字符验证码`接口，`账号密码登录`功能依旧可用。等待后续更新滑动验证方式，推荐使用`扫码登录`。\n\n## 备注\n\n- 🌟强烈建议大家在部署代码前使用有货的商品测试下单流程，并且：在京东购物车结算页面设置发票为`电子普通发票-个人`，设置支付方式为`在线支付`，否则可能出现各种未知的下单失败问题。🌟\n- 京东商城的登陆/下单机制经常改动，当前测试时间`2020.02.08`。如果失效，欢迎提issue，我会来更新。\n- 代码在`macOS`中编写，如果在其他平台上运行出行问题，欢迎提issue。\n\n## 待完成的功能\n\n- [ ] Keep session alive\n- [ ] 抢优惠券\n\n## 不考虑的功能\n\n- ✖️ 支付功能\n- ✖️ 多账号抢购\n\n## Sponsor\n\n[![JetBrains](./docs/jetbrains.svg)](https://www.jetbrains.com/?from=jd-assistant)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftychxn%2Fjd-assistant","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftychxn%2Fjd-assistant","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftychxn%2Fjd-assistant/lists"}