Giter Club home page Giter Club logo

sams_helper's Introduction

sams_helper

山姆下单助手

借鉴自: https://github.com/robGoods/sams v1.0

使用方式

0x01 配置

主要修改 config.yaml 文件中以下内容:

authToken: "<authToken>"	# 山姆会员token,从 Header 中获取
runMode: 1                      # 1-> 山姆抢购,2->保供抢购
bruteCapacity: false            # 运力爆破模式,开启则会尝试覆盖所有时间
deliveryType: 2                 # 1->极速达,2->全城配
ignoreInvalid: true             # 是否忽略无效商品
noticeType: 0			# 0->不通知, 1->Bark, 2->Server酱,3->OSX 系统语音

其他配置(尤其是通知相关配置)请查看文件内注释自行修改

0x02 运行方式

I. 源代码

命令行运行

go run main.go

II. Release

  1. Releases 页面下载对应系统版本。
  2. config.yaml 单独保存至与执行文件同级目录下并修改。
    .
    ├── LICENSE
    ├── README.md
    ├── config.yaml     (配置文件)
    ├── goodsList.yaml  (商品列表:用于将指定(无货)商品提前加入购物车)
    └── sams_helper     (程序本体)
    
  3. 命令行运行可执行文件。

注意

  1. runUnlimited: true永不停歇模式开启
    • 下单成功会回到购物车检查状态,如果没有设置提醒可能错过文字消息。
    • 保供商品已下单的套餐不会再次购买,在保供抢购下不建议程序持续开启超过一天。
  2. runMode: 2保供自动抢单模式,可以配置黑白名单进行筛选,具体内容在config.yaml - supplySet自行配置
  3. bruteCapacity: true 开启运力暴力模式
    • 此模式下主要以尽力下单为目标,最终配送时间跨度可能较大
    • 暴力模式会通过全城配来下单,可能导致最终订单内取消部分极速达商品(具体可通过查看移动端购物车全城配即为最终订单商品列表)。
  4. 如果购物车里同时存在极速达全城配商品,若deliveryType = 2,则会尝试通过全城配购买极速达货物(可能无货)。
  5. ignoreInvalid 忽略无效商品
    • true 在检测有无效商品时自动剔除,继续提交订单(可能会因为金额减少增加运费)。
    • false 会一直检测等待至商品全部有效才会尝试提交订单。
  6. autoFixPurchaseLimit 限购数量自动修正
    • isEnabled: true 开启修正
    • fixOffline: true 线下购物车修正,单独开启只影响最后提交订单数量
    • fixOnline: true 线上购物车修正,修正后会重新获取购物车信息
  7. noticeType = 3Mac Sound 提醒,仅对 OSX 系统有效。

已知情况

  1. 部分地区不释放运力,具体表现为20:59:00左右运力列表并未更新,且唯一显示运力为隔天不可用
  2. 部分地区保供列表套餐有数量,添加购物车但无法结算,认为运力不可达

主要更新:

  • 2022年05月02日 新增全平台购物车勾选状态同步设置
  • 2022年05月01日 新增强制添加购物车强制更新商店设置,新增下单金额限制功能
  • 2022年04月29日 添加自动输入设置
  • 2022年04月28日 添加永不停歇设置
  • 2022年04月26日 添加优惠券模块
  • 2022年04月25日 保供商品筛选修改为黑白名单
  • 2022年04月21日 保供商品可通过关键字排除
  • 2022年04月20日 添加保供自动抢单模块
  • 2022年04月19日 添加运力暴力模式模块
  • 2022年04月18日 添加Server酱提醒模块
  • 2022年04月16日 添加小程序模拟模式方式
  • 2022年04月15日 选择地址后自动更新购物车
  • 2022年04月14日 修正一些函数问题

效果



声明

本项目仅供学习交流,严禁用作商业行为,特别禁止黄牛加价代抢等!

因违法违规等不当使用导致的后果与本人无关,如有任何问题可联系本人删除!

sams_helper's People

Contributors

sari3l avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.