大麦抢票脚本

大麦抢票脚本-记得安装脚本软件

Chrome:Tampermonkey 或 Violent monkey

Firefox:GreasemonkeyTampermonkey

1.选中场次票价,登录填好收货信息

// ==UserScript==
// @name         大麦抢票-选场次票价人数
// @namespace    https://www.jwang0614.top/scripts
// @version      0.6
// @description  辅助购买大麦网演唱会门票
// @author       Olivia Wang
// @match        https://detail.damai.cn/*
// @grant        none
// ==/UserScript==

(function() {
    //'use strict';
    // Your code here...
    if(!window.localStorage){
        alert('不支持这个浏览器,请换成Chrome或者Safari。');
        return null;
    }



    /****  改人数  ***/
    var people_num = 1;

    var storage = window.localStorage;
    storage.setItem("people_num", people_num);
    //storage.clear();

    var start = document.createElement("P");
    start.appendChild(document.createTextNode("开始抢票 (ctrl+E)"));
    start.style.lineheight="50px";
    start.style.color="white";
    start.style.fontSize="30px";
    start.style.padding="10px 20px";
    start.style.background="green";
    start.style.position="fixed";
    start.style.right="30px";
    start.style.top="100px";
    start.style.zIndex="10000";

    var stop = document.createElement("P");
    stop.appendChild(document.createTextNode("停止抢票 (ctrl+T)"));
    stop.style.lineheight="50px";
    stop.style.color="white";
    stop.style.fontSize="30px";
    stop.style.padding="10px 20px";
    stop.style.background="black";
    stop.style.position="fixed";
    stop.style.right="30px";
    stop.style.top="200px";
    stop.style.zIndex="10000";

    var notice = document.createElement("DIV");
    notice.style.color="white";
    notice.style.background="darkseagreen";
    notice.style.fontSize="20px";
    notice.style.padding="10px 20px";
    notice.style.position="fixed";
    notice.style.right="30px";
    notice.style.top="300px";
    notice.style.lineheight="30px";
    notice.style.zIndex = "10000";
    notice.style.width = "300px";
    var notice_0 = document.createElement("P");
    notice_0.appendChild(document.createTextNode("1.选择场次 2.选择价格 3.点击‘开始抢票’"));
    var notice_1 = document.createElement("P");
    notice_1.appendChild(document.createTextNode("当前选择人数:" + people_num + "人"));
    var notice_2 = document.createElement("P");
    notice_2.appendChild(document.createTextNode("如需改变请在脚本中修改people_num变量"));
    var notice_3 = document.createElement("P");
    notice_3.appendChild(document.createTextNode("请先登录,填写一个默认地址,输入"+ people_num+"个购票人"));
    var notice_4 = document.createElement("P");
    notice_4.appendChild(document.createTextNode("不支持选座"));
    var notice_5 = document.createElement("P");
    notice_5.appendChild(document.createTextNode("如果不是快递票不要忘了修改另一个脚本中姓名(contact)和电话(phone)的值。"));

    notice_0.style.color = "white";
    notice_0.style.background = "red";
    notice.appendChild(notice_0);

    notice.appendChild(notice_1);
    notice.appendChild(notice_2);


    notice_3.style.color = "red";
    notice_3.style.background = "white";
    notice.appendChild(notice_3);
    notice_4.style.color = "red";
    notice_4.style.background = "white";
    notice.appendChild(notice_4);

    notice_5.style.color = "white";
    notice_5.style.background = "red";
    notice.appendChild(notice_5);

    var container = document.querySelector('body');
    container.appendChild(start);
    container.appendChild(stop);
    container.appendChild(notice);


    reload_page();



    document.onkeydown = function() {

        var oEvent = window.event;
        if (oEvent.keyCode == 69 && oEvent.ctrlKey) {
            //alert("你按下了ctrl+E");
            // start
            start.click();
        }else if (oEvent.keyCode == 84 && oEvent.ctrlKey) {
            //alert("你按下了ctrl+T");
            // stop
            stop.click();
        }
    }

    function timedRefresh(timeoutPeriod) {
        window.setTimeout("location.reload(true);",timeoutPeriod);
    }


    start.onclick = function() {
        console.log('开始抢票!');
        //blinkStart();
        document.querySelector('body > div.perform').style.background="darksalmon";
        storage.setItem("isRunning", true);

        get_numbers_from_page();

        timedRefresh(400);

    };

    stop.onclick = function() {
        alert('停止抢票!');
        document.querySelector('body > div.perform').style.background="white";
        storage.setItem("isRunning", false);
        storage.removeItem("isRunning");
        storage.removeItem("price_ele_num");
        storage.removeItem("event_ele_num");
        storage.removeItem("people_num");
        storage.clear();

    };

    function sleep (time) {
        return new Promise((resolve) => setTimeout(resolve, time));
    }

    function set_up_check_page() {
        console.log("set up check page");

        var event_ele_num = storage.getItem("event_ele_num");
        var price_ele_num = storage.getItem("price_ele_num");
        var people_num = storage.getItem("people_num");

        if (storage.getItem("isRunning") == "true") {
            var perform_ele = document.querySelector('body > div.perform');
            if (perform_ele) {
                perform_ele.style.background="darksalmon";
            }
            
        }

        var event_selections = document.querySelectorAll('body > div.perform > div > div.flex1 > div.hd > div > div.order > div.perform__order__box > div.perform__order__select.perform__order__select__performs > div.select_right > .select_right_list > .select_right_list_item');



        event_selections[event_ele_num].click();
        console.log("event");

        sleep(200).then(() => {
            var price_selections = document.querySelectorAll('body > div.perform > div > div.flex1 > div.hd > div > div.order > div.perform__order__box > div.perform__desc__info + div > div.select_right > .select_right_list > .select_right_list_item');

            if (price_selections[price_ele_num]) {
                price_selections[price_ele_num].click();
                console.log("price");

                sleep(100).then(()=>{
                var people_selection = document.querySelector(".cafe-c-input-number-input");

                if (people_selection) {
                    var people_inc_btn = document.querySelector('a.cafe-c-input-number-handler.cafe-c-input-number-handler-up');
                    for (var i =1; i < people_num; i++) {
                        people_inc_btn.click();
                        console.log("inc");
                    }

                    sleep(50).then(()=>{
                        var btn = document.querySelector("body > div.perform > div > div.flex1 > div.hd > div > div.order > div.perform__order__box > div:last-child > div");
                        console.log(btn);
                        if (btn) {
                            if (btn.innerText == "立即购买" || btn.innerText == "立即预定") {
                                storage.removeItem("isRunning");
                                storage.removeItem("price_ele_num");
                                storage.removeItem("event_ele_num");
                                storage.removeItem("people_num");
                                storage.clear();
                                btn.click();
                            }
                        }

                    });


                }

                if (storage.getItem("isRunning") == "true") {
                    console.log("refreshing");
                    timedRefresh(1000);
                }

            });


            } else {
                console.log("price_selections not found");
                timedRefresh(400);
            }



            


        });

        

    }

    function get_numbers_from_page() {
        var event_selections = document.querySelectorAll('body > div.perform > div > div.flex1 > div.hd > div > div.order > div.perform__order__box > div.perform__order__select.perform__order__select__performs > div.select_right > div > div');
        var price_selections = document.querySelectorAll('body > div.perform > div > div.flex1 > div.hd > div > div.order > div.perform__order__box > div.perform__desc__info + div > div.select_right > div > div');

        for (var i= 0;i < event_selections.length;i++) {
            if (event_selections[i].classList.contains("active")) {
                storage.setItem("event_ele_num", i);
                break;
            }
        }

        for (var j= 0;j < price_selections.length;j++) {
            if (price_selections[j].classList.contains("active")) {
                storage.setItem("price_ele_num", j);
                break;
            }
        }

    }

    function reload_page() {
        console.log("reload");
        //alert(storage.getItem("isRunning"));
        window.setTimeout(set_up_check_page,100);

    }

})();

2.跳支付页面

// ==UserScript==
// @name         大麦抢票-确认
// @namespace    https://www.jwang0614.top/scripts
// @version      0.5
// @description  辅助购买大麦网演唱会门票
// @author       Olivia Wang
// @match        https://buy.damai.cn/orderConfirm*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    console.log("confirm");
    var audio = new Audio("http://audio.marsupialgurgle.com/audio/successtrumpet.mp3");


    //TODO 判断纸质票还是电子票

    var d_method = "express";

    var methods = ["electron","express", "self"];

    /** 修改配送方式,电子票index=0, 快递票index=1, 自助index=2**/
    // 默认快递票因为不需要再次填写信息
    var index = 1;
    /** 修改名字,电话号码**/
    var contact = "your_name";
    var phone = "your_phone_number";

    //等待10秒
    var wait_time = 10;


    var notice = document.createElement("DIV");

    notice.style.lineheight="30px";
    notice.style.color="white";
    notice.style.fontSize="18px";
    notice.style.padding="10px 20px";
    notice.style.background="green";
    notice.style.position="fixed";
    notice.style.left="30px";
    notice.style.top="100px";
    notice.style.zIndex="10000";

    var contact_p = document.createElement("P");
    contact_p.appendChild(document.createTextNode(contact));
    var phone_p = document.createElement("P");
    phone_p.appendChild(document.createTextNode(phone));

    notice.appendChild(contact_p);
    notice.appendChild(document.createElement("BR"));
    notice.appendChild(phone_p);


    var confirm = document.createElement("P");
    confirm.appendChild(document.createTextNode("确认订单"));
    confirm.style.lineheight="30px";
    confirm.style.color="white";
    confirm.style.fontSize="18px";
    confirm.style.padding="10px 20px";
    confirm.style.background="red";
    confirm.style.position="fixed";
    confirm.style.left="30px";
    confirm.style.top="200px";
    confirm.style.zIndex="10000";

    var container = document.querySelector('body');
    container.appendChild(notice);
    container.appendChild(confirm);




    var way_items = document.querySelectorAll(".way-item");

    if (way_items.length > 1) {
        var selector_str = ".way-item." + methods[index] + " > .way-image";
        var ele = document.querySelector(selector_str);
        if (ele) {
            ele.click();
        }

    }

    audio.play();


    var inputs = document.querySelectorAll(".delivery-form-row input");



    var persons = document.querySelectorAll('#confirmOrder_1 > div.dm-ticket-buyer > div.ticket-buyer-select > div.next-row.next-row-no-padding.buyer-list > div > label > span.next-checkbox.isFirefox > span');
    console.log(persons);
    if (persons.length !== 0) {
        for(var i = 0; i < persons.length; i++) {
            persons[i].click();
        }
    }
    if (inputs.length === 0) {
        // 不需要填写
        document.querySelector('#confirmOrder_1 > div.submit-wrapper > button').click();

    } else {

        // 等待用户输入姓名和电话
        sleep(wait_time * 1000).then(()=>{
            document.querySelector('#confirmOrder_1 > div.submit-wrapper > button').click();

        });


    }

    confirm.onclick = function(){
        this.style.background = "grey";
        document.querySelector('#confirmOrder_1 > div.submit-wrapper > button').click();
    };

})();


function sleep (time) {
    return new Promise((resolve) => setTimeout(resolve, time));
}

                                        

  • 53
    点赞
  • 321
    收藏
    觉得还不错? 一键收藏
  • 44
    评论
麦抢辅助工具 演唱会个人抢辅助工具 源代码 小程序 app 供参考 大麦抢辅助工具 演唱会个人抢辅助工具 源代码 小程序 app 供参考 大麦抢辅助工具 演唱会个人抢辅助工具 源代码 小程序 app 供参考 大麦抢辅助工具 演唱会个人抢辅助工具 源代码 小程序 app 供参考 大麦抢辅助工具 演唱会个人抢辅助工具 源代码 小程序 app 供参考 大麦抢辅助工具 演唱会个人抢辅助工具 源代码 小程序 app 供参考 大麦抢辅助工具 演唱会个人抢辅助工具 源代码 小程序 app 供参考 大麦抢辅助工具 演唱会个人抢辅助工具 源代码 小程序 app 供参考 大麦抢辅助工具 演唱会个人抢辅助工具 源代码 小程序 app 供参考 大麦抢辅助工具 演唱会个人抢辅助工具 源代码 小程序 app 供参考 大麦抢辅助工具 演唱会个人抢辅助工具 源代码 小程序 app 供参考 大麦抢辅助工具 演唱会个人抢辅助工具 源代码 小程序 app 供参考 大麦抢辅助工具 演唱会个人抢辅助工具 源代码 小程序 app 供参考 大麦抢辅助工具 演唱会个人抢辅助工具 源代码 小程序 app 供参考 大麦抢辅助工具 演唱会个人抢辅助工具 源代码 小程序 app 供参考 大麦抢辅助工具 演唱会个人抢辅助工具 源代码 小程序 app 供参考 大麦抢辅助工具 演唱会个人抢辅助工具 源代码 小程序 app 供参考 大麦抢辅助工具 演唱会个人抢辅助工具 源代码 小程序 app 供参考 大麦抢辅助工具 演唱会个人抢辅助工具 源代码 小程序 app 供参考 大麦抢辅助工具 演唱会个人抢辅助工具 源代码 小程序 app 供参考 大麦抢辅助工具 演唱会个人抢辅助工具 源代码 小程序 app 供参考 大麦抢辅助工具 演唱会个人抢辅助工具 源代码 小程序 app 供参考 大麦抢辅助工具 演唱会个人抢辅助工具 源代码 小程序 app 供参考 大麦抢辅助工具 演唱会个人抢辅助工具 源代码 小程序 app 供参考 大麦抢辅助工具 演唱会个人抢辅助工具 源代码 小程序 app 供参考 大麦抢辅助工具 演唱会个人抢辅助工具 源代码 小程序 app 供参考 大麦抢辅助工具 演唱会个人抢辅助工具 源代码 小程序 app 供参考
麦抢脚本是一种用于帮助用户快速抢购大麦网上门的手机应用程序。大麦网是中国最大的在线务平台之一,由于热门演出门供不应求,往往会造成用户抢失败的情况。为了提高抢成功率,一些技术人员开发了大麦抢脚本。 大麦抢脚本的原理是通过自动化程序实现快速提交订单、自动刷新页面等操作,从而在极短的时间内完成抢的过程。用户只需要提前设置好相关参数,启动脚本后等待即可。 大麦抢脚本具有以下特点和优势:高效快速、准确无误、自动化操作、节省用户时间和精力、提高抢成功率等。它可以很大程度上提高用户抢的成功率,并且减少了用户抢过程中出现的繁琐重复操作,提高了用户的购体验。 然而,使用大麦抢脚本也存在一定的风险。首先,大麦网对于使用脚本进行抢的行为进行了明确的规定,如果被系统检测到使用脚本,可能会导致用户被封号或限制购等处罚措施。其次,由于抢脚本需要对网络数据进行操作,存在一定的安全风险,可能会暴露用户的个人信息。 因此,使用大麦抢脚本需要谨慎操作,遵守相关规定,同时加强个人信息保护措施。此外,也应该尊重其他用户的抢权益,避免滥用脚本导致资源浪费和源紧缺的问题。 总之,大麦抢脚本是一种提高用户抢成功率和购效率的工具,但在使用时需要合法合规,遵守相应规定,切忌滥用。
评论 44
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值