Giter VIP home page Giter VIP logo

actions-mtz-coupons's Introduction


workflow release update forks forks


🧧 外卖神券天天领

外卖神券天天领,超值红包享不停;以自动化的方式领取外卖红包。


Tip

★ 专注领劵,不搞杂七杂八
★ 多帐号支持,全村都能配上
★ 并行化任务,数管齐下更有效率
★ 异常重试,一次不行再来一次
★ 多路消息通知,总有一个到达你
★ Github Actions 部署,操作如此简单

📕 使用

环境要求

获取账号 Token

示例:

Js3xxxxFyy_Aq-rOnxMte6vKPV4AAAAA6QwAADgqRBSfcmNqyuG8CQ7JDL7xxxxNGbfF7tPNV5347_ANLcydua_JHCSRj0_xx

1. Fork 源项目

  1. 访问 actions-mtz-coupons 源仓库
  2. 点击右上角 Star 按钮 ;)
  3. 点击右上角 Fork 按钮

Tip

Fork 后的项目可执行 npm run sync 同步上游更新,详情参考 一键同步

2. 配置 Actions secrets

  1. 导航到你的仓库主页面,点击 ⚙️Settings
  2. 在边栏的 "Security" 部分中选择 Secrets and variables、然后单击 Actions
  3. 选中 Secrets tab,点击 New repository secret 创建仓库密码
    1. Name 表单项填入 "TOKEN"
    2. Secret 表单项填入 Token 值(参考 获取 Token
  4. 点击 Add secret 保存配置

3. 启用 Actions

  1. 导航到你的仓库主页面,点击 Actions
  2. 在左侧边栏中,点击 领红包 启用
  3. 点击 Enable workflow 启用 Actions

脚本触发方式

Github Actions 工作流支持手动自动两种触发方式。

定时触发(默认开启)

每日 11:00 前定时执行。

手动触发

🤹‍♂️ 进阶用法

🏗 参与贡献

请参阅:CONTRIBUTING.md

📜 声明

本项目仅供学习与研究之用,请勿用于商业或非法用途。原作者不能完全保证项目的合法性,准确性和安全性,因使用不当造成的任何损失与损害,与原作者无关。请仔细阅读此声明,一旦您使用并复制了本项目,则视为已接受此声明。

Star History

Star History Chart

actions-mtz-coupons's People

Contributors

code2qing avatar vv314 avatar xianshenglu avatar yd-coder avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

actions-mtz-coupons's Issues

领取失败

失败后重试了一次,还是失败。

Run yarn start
yarn run v1.22.19
$ node index

───────────────────────────────────────
actions-mtwm-coupons
外卖神券天天领
────────────────────────

Ver. 1.8.1

Github @vv314

────────── [1/1] 账号: token1 ──────────

程序异常 Error: Payload 获取失败
at getPayload (file:///home/runner/work/actions-mtz-coupons/actions-mtz-coupons/lib/payload.js:60:11)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Object.grabCoupon (file:///home/runner/work/actions-mtz-coupons/actions-mtz-coupons/lib/coupons/takeAway.js:32:19)
at async runTask (file:///home/runner/work/actions-mtz-coupons/actions-mtz-coupons/lib/coupons/index.js:59:34)
at async main (file:///home/runner/work/actions-mtz-coupons/actions-mtz-coupons/lib/coupons/index.js:133:20)
at async doJob (file:///home/runner/work/actions-mtz-coupons/actions-mtz-coupons/index.js:126:15)

😦 领取失败

────────── 推送通知 ──────────

[全局通知] Telegram 推送成功
Done in 5.28s.

好像失效了

经过调试发现返回的信息为:
{
"code": 4,
"msg": "发券失败异常",
"data": null
}

「点击领取」的请求更新了

curl 'https://mediacps.meituan.com/gundam/gundamGrabV2'
-H 'Connection: keep-alive'
-H 'Pragma: no-cache'
-H 'Cache-Control: no-cache'
-H 'Accept: application/json, text/plain, /'
-H 'User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1'
-H 'Content-Type: application/json;charset=UTF-8'
-H 'Origin: https://market.waimai.meituan.com'
-H 'Sec-Fetch-Site: same-site'
-H 'Sec-Fetch-Mode: cors'
-H 'Sec-Fetch-Dest: empty'
-H 'Referer: https://market.waimai.meituan.com/'
-H 'Accept-Language: zh-CN,zh;q=0.9,en;q=0.8'
-H 'Cookie: IJSESSIONID=node013gx1oxcldeq515q82o1iq1q9s5142833; iuuid=E8175A0B6828B634E5100B26DE1044F9D85DD4332C69E5FBB3EDE3FF98C17C4A; __utma=74597006.1812666126.1622776984.1622776984.1622776984.1; __utmc=74597006; __utmz=74597006.1622776984.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); ci3=1; ci=10; cityname=%E4%B8%8A%E6%B5%B7; backurl=http://i.meituan.com/account/?cevent=imt%2Fhomepage%2Fmine; uuid=98982bfb4b7d4519a6e2.1622777038.1.0.0; token=uO-mA36x3uEcHAWdlVXZrihZKI8AAAAAqA0AACiH4bZFmjC8oCBwJGS6cIPbSXdgB7DWZUMoORLQXBQt3NJE7slUfDTngEGBdlpapQ; mt_c_token=uO-mA36x3uEcHAWdlVXZrihZKI8AAAAAqA0AACiH4bZFmjC8oCBwJGS6cIPbSXdgB7DWZUMoORLQXBQt3NJE7slUfDTngEGBdlpapQ; oops=uO-mA36x3uEcHAWdlVXZrihZKI8AAAAAqA0AACiH4bZFmjC8oCBwJGS6cIPbSXdgB7DWZUMoORLQXBQt3NJE7slUfDTngEGBdlpapQ; userId=59407300; u=59407300; isid=uO-mA36x3uEcHAWdlVXZrihZKI8AAAAAqA0AACiH4bZFmjC8oCBwJGS6cIPbSXdgB7DWZUMoORLQXBQt3NJE7slUfDTngEGBdlpapQ; logintype=normal; i_extend=GimthomepagemineH__a100001__b1; latlng=31.22114,121.54409,1622777890574'
--data-raw '{"grabKey":"AD317E383B064F84ACE3A8DCDC8C2572,DFEAE6C5C7664DBBB5A64E5F52297B5C","gundamId":20625,"actualLatitude":31221140,"actualLongitude":121544090}'
--compressed

已失效

程序异常 {
code: 2,
api: 'gundamGrabV3',
msg: '找不到请求路径: no matched api config found: mediacps.meituan.com/gundam/gundamGrabV3 at server: com.sankuai.apigw.tsp.default'
}

😦 领取失败

token获取获取不到了

20230901113849

chrome 访问 i.meituan.com
之前都是直接登录的,今天突然提示”请求异常,拒绝操作“,反复试了几次都是如此
账号是正常的,手机浏览器正常登录

失效了

程序异常 Error: 活动配置数据获取失败: TypeError: Cannot read property '0' of null
at getTemplateData (/home/runner/work/actions-mtz-coupons/actions-mtz-coupons/lib/coupons/qualityShop.js:23:11)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async Object.grabCoupon (/home/runner/work/actions-mtz-coupons/actions-mtz-coupons/lib/coupons/qualityShop.js:28:20)
at async runTask (/home/runner/work/actions-mtz-coupons/actions-mtz-coupons/lib/coupons.js:69:37)
at async main (/home/runner/work/actions-mtz-coupons/actions-mtz-coupons/lib/coupons.js:138:20)
at async doJob (/home/runner/work/actions-mtz-coupons/actions-mtz-coupons/index.js:124:15)

程序异常 TypeError: Cannot read properties of undefined (reading 'keys')

at getPayload (/home/runner/work/actions-mtz-coupons/actions-mtz-coupons/lib/payload.js:55:53)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Object.grabCoupon (/home/runner/work/actions-mtz-coupons/actions-mtz-coupons/lib/coupons/takeAway.js:29:19)
at async runTask (/home/runner/work/actions-mtz-coupons/actions-mtz-coupons/lib/coupons.js:68:34)
at async main (/home/runner/work/actions-mtz-coupons/actions-mtz-coupons/lib/coupons.js:138:20)
at async doJob (/home/runner/work/actions-mtz-coupons/actions-mtz-coupons/index.js:124:15)

😦 领取失败

按照“本地运行”教程,本地电脑电脑执行出错

教程:

https://github.com/vv314/actions-mtz-coupons/blob/main/docs/%E6%9C%AC%E5%9C%B0%E8%BF%90%E8%A1%8C.md

D:\softwareInstall\nvm\v18.19.1\npm.cmd run start:local

[email protected] start:local
node index.local

node:internal/errors:496
ErrorCaptureStackTrace(err);
^

Error [ERR_INTERNAL_ASSERTION]: Code: ERR_MODULE_NOT_FOUND; The provided arguments length (2) does not match the required ones (3).
This is caused by either a bug in Node.js or incorrect usage of Node.js internals.
Please open an issue with this stack trace at https://github.com/nodejs/node/issues

at new NodeError (node:internal/errors:405:5)
at assert (node:internal/assert:14:11)
at getMessage (node:internal/errors:451:5)
at new NodeError (node:internal/errors:379:21)
at legacyMainResolve (node:internal/modules/esm/resolve:218:9)
at packageResolve (node:internal/modules/esm/resolve:903:14)
at moduleResolve (node:internal/modules/esm/resolve:973:20)
at defaultResolve (node:internal/modules/esm/resolve:1193:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:403:12)
at ModuleLoader.resolve (node:internal/modules/esm/loader:372:25) {

code: 'ERR_INTERNAL_ASSERTION'
}

Node.js v18.19.1

Process finished with exit code 1

时不时就登录过期怎么解决

在Chrome登录获取到token之后,不时打开telegram查看,发现总是登录过期,这怎么办,只能每次都重新登录一下吗

多账号配置时,userCondition 上面显示的电话为同一个

举例:
────────── 1/3 账号: token1 ──────────


name: '天天神券',
etime: '明日到期',
amount: '3',
amountLimit: '满20可用',
useCondition: '限天天神券商家使用。限非到店自取订单使用。限登录和收餐手机号为185******18使用。'

────────── 2/3 账号: token3 ──────────


name: '宠物5元惊喜红包',
etime: '有效期至2022.09.18',
amount: '5',
amountLimit: '满10可用',
useCondition: '限活动商家使用。限非到店自取订单,宠物类商家等使用。限登录和收餐手机号为185******18使用。'

────────── 3/3 账号: token2 ──────────


name: '宠物5元惊喜红包',
etime: '有效期至2022.09.18',
amount: '5',
amountLimit: '满10可用',
useCondition: '限活动商家使用。限非到店自取订单,宠物类商家等使用。限登录和收餐手机号为185******18使用。'

饿了么

请问有人知道有饿了么类似的项目吗

请教一下这是什么问题呢?

────────── [1/1] 账号: token1 ──────────

接口异常 { code: 2, api: 'gundamGrabV3', msg: undefined }
重试: 2 次

😦 领取失败

────────── 推送通知 ──────────

/home/runner/work/actions-mtz-coupons/actions-mtz-coupons/index.js:8
throw err
^

TypeError: Cannot read property 'then' of undefined
at /home/runner/work/actions-mtz-coupons/actions-mtz-coupons/index.js:149:31
at Array.forEach ()
at printNotifyResult (/home/runner/work/actions-mtz-coupons/actions-mtz-coupons/index.js:149:14)
at main (/home/runner/work/actions-mtz-coupons/actions-mtz-coupons/index.js:179:9)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Error: Process completed with exit code 1.

多账号配置问题

单个账号测试没有问题,但是多账号配置下就会报错:

────────── [1/2] 账号: token2 ──────────

登录过期 { code: 1, api: 'gundamLogin', msg: '未登录异常' }

😦 领取失败

────────── [2/2] 账号: token1 ──────────

程序异常 ReferenceError: ECODE is not defined
at Object.grabCoupon (/home/runner/work/actions-mtz-coupons/actions-mtz-coupons/lib/coupons/takeAway.js:41:19)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async runTask (/home/runner/work/actions-mtz-coupons/actions-mtz-coupons/lib/coupons.js:68:34)
at async main (/home/runner/work/actions-mtz-coupons/actions-mtz-coupons/lib/coupons.js:138:20)
at async doJob (/home/runner/work/actions-mtz-coupons/actions-mtz-coupons/index.js:124:15)

😦 领取失败

配置格式:
[{
"token": "FL8jIv3ow5NCBFVbMuLf-Cog6_MAAAAAxhMAAFx0fKcmqehl9LgLMKB8aNuE8GTJBWOqRttPhp1jtGEYphNXTXXXXXX",
"tgUid": "5944XXXX"
},{
"token": "fzoP0m7d-MMN_V1WH9WvDWQ_DhsAAAAAxhMAAEqMk6ygSXkPxNkFcnIZAcKum8zqBVdrWnRlgfiruZI2AbPeTJctPcGDSXXXXXX",
"tgUid": "594XXXX"
}]

美团token无法获取

如果直接用网页会操作异常,用app模式会进入死循环。估计被官方修复获取方式,请问还有啥获取途径?

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.