寂寞如雪 发表于 2015-10-16 08:59:35

转载!购物达人必备福利!溢出领光天猫双十一所以优惠券!

本帖最后由 寂寞如雪 于 2015-10-16 09:03 编辑


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



(function(window, document, undefined) {
    var interval = 800;
    var closeDelay = 200;
    var index = 0;
    var couponLinks;
    var getCoupon = function() {
      if (index >= couponLinks.length) {
            console.log("领取完毕");
            return;
      }
      var coponLink = couponLinks;
      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);

复制代码



15980587147 发表于 2015-10-16 09:50:35

转载!购物达人必备福利!溢出领光天猫双十一所以优惠券

荆棘花 发表于 2015-10-16 11:14:37

膜拜,膜拜

荆棘花 发表于 2015-10-16 11:16:48

膜拜,膜拜

荆棘花 发表于 2015-10-16 11:20:28

骗人的,我买了,领取不了

卖汤圆的小贰 发表于 2015-10-16 12:11:47

荆棘花 发表于 2015-10-16 11:20
骗人的,我买了,领取不了

他已经把所有优惠券都领光了。你还领啥?

月亮是我啃完的 发表于 2015-10-16 12:43:43

asdsadsadsa

海潮 发表于 2015-10-16 16:36:23

有点意思,晚上试试~

荆棘花 发表于 2015-10-17 09:41:52

这完全骗人,版主 也不管管么?

test 发表于 2015-10-17 10:18:52

首先进入活动页面 http://www.tmall.com/wow/act/14931/1111 ,随便找个地方点击鼠标右键,选择审查元素,点击 Console ,进入控制台。
复制以下代码,回车,令其自动运行脚本:
(function(window, document, undefined) {
    var interval = 800;
    var closeDelay = 200;
    var index = 0;
    var couponLinks;
    var getCoupon = function() {
      if (index >= couponLinks.length) {
            console.log("领取完毕");
            return;
      }
      var coponLink = couponLinks;
      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);

PS:只提供方法,风险自动承担。
页: [1] 2
查看完整版本: 转载!购物达人必备福利!溢出领光天猫双十一所以优惠券!