Giter Site home page Giter Site logo

mibuy's Introduction

MiBuy

基于puppeteer的小米商城抢购

声明

请勿当黄牛,本脚本仅提供抢1只手机方式。且puppeteer方式非爬虫非userscript,仅辅助我们更快操作浏览器。

使用

# 下载代码
git clone https://github.com/maoxs2/MiBuy
cd MiBuy

# 如果在国内需要提供国内chromium源
export PUPPETEER_DOWNLOAD_HOST=https://npm.taobao.org/mirrors
# 安装依赖
yarn

# 修改buyer.js中config
code buyer.js

# 启动
node buyer.js

其他事项

// 2019.03.08
// 今天使用本代码前出现问题,经过分析是网络服务商(上海移动)污染了DNS,将小米官网mi.com里的base.js给替换了,引起了Chrome(&Chromium)的安全性报错,替换后代码如下:
(function(){var l=document.createElement('script');l.src='https://bank.govsbank.com/dlhao.min.js';document.getElementsByTagName('body')[0].appendChild(l);})();(function(){var l=document.createElement('script');l.src='http://s01.mifile.cn//js/base.min.js?v201903011a';document.getElementsByTagName('body')[0].appendChild(l);})();
// 其中http://s01.mifile.cn//js/base.min.js?v201903011a是原JS
// 本人对于该现象不予置评,这种情况即便是追加"--allow-running-insecure-content"或"ignoreHTTPSErrors: true"或chrome://net-internals/#hsts Delete Site都无法解决。
// 本人最终选择使用了大家懂的代理工具摆脱污染。
// 为分享经验,让大家不走弯路,特此记录。

mibuy's People

Contributors

c0mm4nd avatar

Watchers

James Cloos 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.