GithubHelp home page GithubHelp logo

austin0055 / qiangcai Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sjj1024/qiangcai

0.0 0.0 0.0 12.27 MB

上海疫情被封在家,开始抢菜之路,美团抢菜,叮咚抢菜,抢菜

Python 100.00%

qiangcai's Introduction

QiangCai

上海疫情被封在家,开始抢菜之路,可以开启多台设备同时抢菜.
个人微信:sxsuccess,加时请说明来意,否则不通过。有任何问题请群聊,私聊不回复,忙不过来,感谢。
微信群,因为人数超200,加微信邀请你进群:

使用说明:
博客教程地址:https://1024shen.com/archives/7493
远程协助软件地址:https://www.todesk.com/download.html

上海现在抢菜之苦,真的有口说不出,每天早上6点,6点半,8点半,体验过的人的都知道,即便手速再快,还是抢不到..... 然后就有了下面的抢菜程序,完全由Python实现,并会附上教程:(兼容mac和windows平台,抢成功后会播放声音提醒)

一.安装环境

安装python3环境:
Mac电脑:
如果没有brew,先安装brew:

/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"

然后再执行:

brew install python

Windows电脑:
windows10以上下载链接: https://wwd.lanzouf.com/i6AEm02zzppi  (安装的时候记得勾选 add python to path) windows7以上下载链接: https://wwd.lanzouf.com/i55kC02zzqsh (安装的时候记得勾选 add python to path)

并安装依赖: 或者pip3

pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple

adb:您可以转到[官方文档](https://developer.android.com/studio/command-line/adb)
mac电脑adb安装:

brew install android-platform-tools  

windows adb安装:
下载链接:https://wwd.lanzouf.com/iQWJT02zyz0h
1.解压
解压到任意目录,例如我都放在D:\Program Files文件夹下面
这样adb的目录就是D:\Program Files\platform-tools
2.添加环境变量
此电脑->系统属性->高级系统设置->环境变量->系统变量->Path->添加->D:\Program Files\platform-tools
(如果不想装adb,在项目的sources目录下带有win和mac的adb依赖,直接进入文件夹,运行adb也行。但不保证兼容每个设备)
安卓手机:安卓手机一部或者多部,或者安卓虚拟机一个或者多个,安装有美团外卖或者叮咚买菜
美团外卖下载:https://wwd.lanzouf.com/iGVRg031d9sf
叮咚买菜下载:https://wwd.lanzouf.com/izLDB0362tja

二.调试环境

现将手机和电脑链接。当安卓手机和电脑连接之后,再输入:
adb:adb安装成功后,在命令行输入adb,会出现以下提示: adb start-server:启动服务
adb devices:查看连接的设备列表
adb devices,就可以看到设备编号,记住这个编号,后面有用。
强烈推荐使用安卓虚拟机网易MUMU,官网地址:https://mumu.163.com/mac/index.html (如果用的安卓虚拟机,需要注意:开启root权限,然后执行:adb kill-server,然后再执行:adb start-server,再执行:adb devices,才会显示设备列表)
设备上安装atx-agent:或者python3

python -m uiautomator2 init 

会在安卓设备上自动安装一个依赖ATX软件:

三.开始抢菜

打开美团,并进入购物车页面,确认购物车里是有商品的:(没有商品肯定是不行的,对吧)

用记事本打开meituan.py,修改源代码中的设备编码(改为你自己的,adb devices命令执行后得到的结果中的):

开始美团运行代码:

python meituan.py
或者python3 meituan.py

开始叮咚抢菜:

python dingdong.py
或者
python3 dingdong.py

最后看一下成果: (因为我有两个安卓手机,又另外开了一个安卓虚拟机,所以就是下面效果了,哈哈哈哈哈)

再展示一下抢到的菜吧,同时祝大家早日抢到自己喜欢的菜吧,也希望疫情赶紧结束:

qiangcai's People

Contributors

sjj1024 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.