Giter Site home page Giter Site logo

autobuy's Introduction

AutoBuy

淘宝等网站抢购脚本

两个版本:

    _pyppeteer_是用的pyppeteer异步渲染的方式写的,可以绕过淘宝webdriver检测,指定账号密码进行模拟登录,然后输入时间可以到时间抢购

    _selenium_使用selenium的,试了一下用扫码登录的方式,减少webdriver检测的风险,也是定时抢购

pyppeteer --get_taobao.py 主程序: ==== 设定账号密码 (修改此处,指定账号密码)====

                             USERNAME = '888'
                             
                             PASSWORD = '8888'
                             
                             BUY_TIME = '2020-02-28 22:10:30'
                             
        wait()方法的功能是定时刷新防止登陆超时,当当前时间-抢购时间>180时每60s刷新一次
                             
        buy()方法是跳到购物车界面,用click事件点击全选,然后开始循环结算,待页面跳转点击提交失败就会重试,上限50次
                             
        main()作用是运行js,修改webdriver的值为false,从而避开检测,之后模拟登入后先调用wait(page),判断时间,再
                             
       调用buy(page)进行购买

selenium --sele——taobao.py 主程序:原理与上面差不多

autobuy's People

Contributors

pandn508 avatar

Watchers

 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.