0.登录你的淘宝账号
1.活动页面
https://www.tmall.com/wow/act/14700/fenqiyushou
https://www.tmall.com/wow/act/14700/ysshuma
https://www.tmall.com/wow/act/14700/jzyshc
https://www.tmall.com/wow/act/14700/jcyshc
https://www.tmall.com/wow/act/14700/jjyshc
https://www.tmall.com/wow/act/14700/zxdzyc
https://www.tmall.com/wow/act/14700/nzysab
https://www.tmall.com/wow/act/14700/cpys
https://www.tmall.com/wow/act/14700/nzys
https://www.tmall.com/wow/act/14700/yxhwys
https://www.tmall.com/wow/act/14700/shoes
https://www.tmall.com/wow/act/14700/nyys
https://www.tmall.com/wow/act/14700/xbfp
https://www.tmall.com/wow/act/14700/mzzs
https://www.tmall.com/wow/act/14700/zbpsys
https://www.tmall.com/wow/act/14700/mzys
https://www.tmall.com/wow/act/14700/jfbyys
https://www.tmall.com/wow/act/14700/jjcfys
https://www.tmall.com/wow/act/14700/shkxyushou
https://www.tmall.com/wow/act/14700/myys
https://www.tmall.com/wow/act/14700/ghjq
https://www.tmall.com/wow/act/14700/spys
https://www.tmall.com/wow/act/14700/yybjys
https://www.tmall.com/wow/act/14700/guojiyushou
https://www.tmall.com/wow/act/14700/tsyq
2.打开chrome游览器,进入每个活动页面,按下F12,出现
3.贴代码:
(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[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('.j_ReceiveCoupon'); console.log("总共:" + couponLinks.length + "条张优惠券待领取..."); getCoupon(); } else { document.body.scrollTop = _scrollTop; } }, 500); }) (window, document);