{"id":17565520,"url":"https://github.com/shaodahong/jd-happy","last_synced_at":"2025-05-16T12:09:08.777Z","repository":{"id":26491976,"uuid":"108071935","full_name":"shaodahong/jd-happy","owner":"shaodahong","description":"[DEPRECATED]Node 爬虫，监控京东商品到货，并实现下单服务","archived":false,"fork":false,"pushed_at":"2025-03-28T16:12:48.000Z","size":3066,"stargazers_count":283,"open_issues_count":19,"forks_count":70,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-03-29T23:07:12.549Z","etag":null,"topics":["node","nodejs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/shaodahong.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":"2017-10-24T03:25:43.000Z","updated_at":"2025-03-21T08:21:28.000Z","dependencies_parsed_at":"2023-12-15T06:28:50.226Z","dependency_job_id":"9a808a9f-316c-4a77-b67d-db263c42e785","html_url":"https://github.com/shaodahong/jd-happy","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/shaodahong%2Fjd-happy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaodahong%2Fjd-happy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaodahong%2Fjd-happy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaodahong%2Fjd-happy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shaodahong","download_url":"https://codeload.github.com/shaodahong/jd-happy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247415966,"owners_count":20935388,"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":["node","nodejs"],"created_at":"2024-10-21T14:11:43.159Z","updated_at":"2025-04-06T00:06:28.609Z","avatar_url":"https://github.com/shaodahong.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eJD-HAPPY\u003ch1\u003e\n\n### 前言\n\n\u003e 由于京东更新，部分接口已过期\n\n代码实现基于[jd-autobuy](https://github.com/Adyzng/jd-autobuy)\n\n京东有代下单服务，但是会有限制，遇到些商品无法使用代下单，只能收到到货提醒，所以想实现个自动下单功能，以免剁手不成，悔恨不已\n\n但是基本上该功能是没有什么卵用的，只不过看着简单用 node 实现了一下，坑比较少，毕竟前人栽树后人乘凉 :smile:\n\n- [x] 扫码登录\n- [x] 根据地区查询商品库存\n- [x] 库存\u003e0 时自动下单\n- [ ] 支持抢购商品\n- [ ] 支持缓存登陆状态（仅本地）\n\n```\n   在初始化浏览器……\n   初始化完成，开始抓取页面\n   页面抓取完成，开始分析页面\n   页面参数到手，关闭浏览器\n\n   -------------------------------------\n                请求扫码\n   -------------------------------------\n\n   二维码未扫描 ，请扫描二维码\n   二维码未扫描 ，请扫描二维码\n   请手机客户端确认登录\n   请手机客户端确认登录\n   请手机客户端确认登录\n   扫码成功，正在登录\n   登录成功\n\n   商品详情------------------------------\n   时间：2017-10-26 19:57:51\n   商品名：英特尔（Intel） i7 8700K 酷睿六核 盒装CPU处理器\n   价格：3999.00\n   状态：无货\n   连接：http://item.jd.com/5008395.html\n\n   商品详情------------------------------\n   时间：2017-10-26 121:37:31\n   商品名：英特尔（Intel） i7 8700K 酷睿六核 盒装CPU处理器\n   价格：3999.00\n   状态：有货\n   连接：http://item.jd.com/5008395.html\n\n   开始加入购物车\n   商品已成功加入购物车！\n\n   订单详情\n   订单总金额：￥3999.00\n   寄送至： 上海 浦东新区 长泰广场\n   收货人：happy 123****8910\n\n   开始下单\n   下单成功,订单号4635622833\n   请前往京东商城及时付款，以免订单超时取消\n```\n\n### 使用\n\n推荐使用 `yarn`\n\n```bash\n$ yarn\n\n$ yarn start -a 2_2830_51810_0 -g 5008395\n```\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"./jd-happy.gif\" width=\"80%\"/\u003e\n\u003c/p\u003e\n\n### 帮助\n\n```bash\n$ yarn start\n\nUsage: node index.js -a 地区编号 -g 商品编号\n\n食用方式: yarn start -a 地区编号 -g 商品编号\n\n选项：\n  --version   显示版本号                                                  [布尔]\n  -a, --area  地区编号                                                    [必需]\n  -g, --good  商品编号                                                    [必需]\n  -t, --time  查询间隔ms                                       [默认值: \"10000\"]\n  -b, --buy   是否下单                                            [默认值: true]\n  -h, --help  显示帮助信息                                                [布尔]\n\n示例：\n  node index.js -a 2_2830_51810_0 -g 5008395\n\n缺少这些必须的选项：a, g\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshaodahong%2Fjd-happy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshaodahong%2Fjd-happy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshaodahong%2Fjd-happy/lists"}