zoukankan      html  css  js  c++  java
  • 一次领光天猫双 11 所有优惠卷

    s模拟鼠标操作页面自动领取优惠劵, 想法很好.类似的操作可以实现很多场景的自动化攻击. 保留做记录.

    方法:首先进入活动页面 http://www.tmall.com/wow/act/14931/1111 ,随便找个地方点击鼠标右键,选择审查元素,点击 Console ,

    右键,审查元素

    点击 Console ,然后复制下面代码在空白处后按回车,即可。如果到时候有优惠的商品,就不用担心了。

     

    (function(window, document, undefined) {
        var interval = 2400;
        var closeDelay = 600;
        var index = 0;
        var couponLinks;
        var getCoupon = function() {
            if (index >= couponLinks.length) {
                console.log("领取完毕");
                return;
            }
            var coponLink = couponLinks[index];
            coponLink.click(); index++;
            console.log("领取 第" + index + " 张");
            setTimeout(getCoupon, interval);
            setTimeout(function() {
                var close = document.querySelector('.mui-dialog-close');
                if (close != null) close.click();
            }, closeDelay);
        }
        var _scrollTop = 0;
        var _scrollStep = document.documentElement.clientHeight;
        var _maxScrollTop = document.body.clientHeight - document.documentElement.clientHeight;
        var autoScrollDown = setInterval(function() {
            _scrollTop += _scrollStep;
            if (_scrollTop > _maxScrollTop) {
                clearInterval(autoScrollDown);
                couponLinks = document.querySelectorAll('.mui-act-item-yhqbtn');
                console.log("总共:" + couponLinks.length + "条张优惠券待领取...");
                getCoupon();
            } else {
                document.body.scrollTop = _scrollTop;
            }
        }, 500);
    }) (window, document);

  • 相关阅读:
    学习git之路--1
    No input file specified. phpStudy nginx报错解决方案
    nginx隐藏tp路由index.php
    tp5命令行
    生成器
    php 解密小程序获取unionid
    根据GUID获取实例
    用SQL将数字转换为中文数字
    TFS无法确定工作区解决方案
    利用SQL语句产生分组序号
  • 原文地址:https://www.cnblogs.com/cute/p/4953066.html
Copyright © 2011-2022 走看看