Giter VIP home page Giter VIP logo

sams_helper's Introduction

sams_helper

山姆下单助手

修改自: https://github.com/robGoods/sams

使用方式

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
    └── sams_helper
    
  3. 命令行运行可执行文件。

注意

  1. runMode: 2保供自动抢单模式尚未正式上线,仅支持从源代码运行
  2. bruteCapacity: true 开启运力暴力模式
    1. 暴力模式会通过全城配来下单,可能导致最终订单内取消部分极速达商品(具体可通过查看移动端购物车全城配即为最终订单商品列表)。
    2. 覆盖所有时间有些歧义,因为山姆策略已有所修改,但理论上还是这个意思。同时注意可能随时因为山姆策略修改导致失效。
  3. 如果购物车里同时存在极速达全城配商品,若deliveryType = 2,则会尝试通过全城配购买极速达货物(可能无货)。
  4. ignoreInvalid 忽略无效商品
    • true 在检测有无效商品时自动剔除,继续提交订单(可能会因为金额减少增加运费)。
    • false 会一直检测等待至商品全部有效才会尝试提交订单。
  5. autoFixPurchaseLimit 限购数量自动修正
    • isEnabled: true 开启修正
    • fixOffline: true 线下购物车修正,单独开启只影响最后提交订单数量
    • fixOnline: true 线上购物车修正,修正后会重新获取购物车信息
  6. noticeType = 3Mac Sound 提醒,仅对 OSX 系统有效。

疑似问题

  1. 部分地区不释放运力,具体表现为20:59:00左右运力列表并未更新,且唯一显示运力为隔天不可用

更新:

  • 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 steinx 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.