May 30, 2022
Tutor
1. Установите расширение Tampermonkey:
Версия для Chrome: Tampermonkey
Версия для Firefox: Tampermonkey
2. Далее кликаем на иконку создать новый скрипт и копируем в окно скрипт который представлен ниже.
Создаем скрипт строго в определенной последовательности и сохраняем файлы.
// ==UserScript==
// @name autoDrawing
// @namespace http://tampermonkey.net/
// @version 0.1.2
// @description asd
// @updateURL https://raw.githubusercontent.com/waslost0/lolzteam_autoLotteryDrawing/master/auto_drawing.js
// @downloadURL https://raw.githubusercontent.com/waslost0/lolzteam_autoLotteryDrawing/master/auto_drawing.js
// @author @waslost
// @match https://lolz.guru/threads/*
// @grant window.close
// ==/UserScript==
function getRndInteger(min, max) {
return Math.floor(Math.random() * (max - min) ) + min;
}
function delay(time) {
return new Promise(resolve => setTimeout(resolve, time));
}
async function waitForElementToDisplay(time) {
var timeout = [20, 60];
var contests = document.querySelector('a[href="https://lolz.guru/forums/contests/"]');
if (contests == null) return;
var already_participate = document.querySelector('.LztContest--alreadyParticipating.button.marginBlock.alreadyParticipate.disabled.hidden');
var participate_button = document.querySelector('.LztContest--Participate.button');
var like = document.querySelector('.icon.likeCounterIcon');
if (already_participate == null || participate_button == null) {
window.close();
}
if (document.getElementsByClassName('errorOverlay').length != 0) {
window.close();
}
if (document.querySelector('.error.mn-15-0-0')) {
window.close();
}
try {
await delay(getRndInteger(timeout[0], timeout[1]) * 1000);
participate_button.click();
console.log('participate click');
await delay(4000);
console.log('like click');
like.click();
await delay(2000);
} catch (e) {}
setTimeout(function () {
waitForElementToDisplay(time);
}, time);
}
waitForElementToDisplay(1000);Сохраняем сочитанием клавишь ctrl+s или кнопкой File/Save
// ==UserScript==
// @name scroll
// @namespace http://tampermonkey.net/
// @version 0.2
// @description Just to scroll page down.
// @downloadURL https://raw.githubusercontent.com/waslost0/lolzteam_autoLotteryDrawing/master/scroll_opentab.js
// @updateURL https://raw.githubusercontent.com/waslost0/lolzteam_autoLotteryDrawing/master/scroll_opentab.js
// @author @waslost
// @match https://lolz.guru/forums/contests/
// @grant GM_openInTab
// ==/UserScript==
/*function scrollpage() {
var Height=document.documentElement.scrollHeight;
var i=1;
function f(){
window.scrollTo(0,i);
Height=document.documentElement.scrollHeight;
i=i+200;
if(i>=Height)
{
openNewPage();
return;
}
setTimeout( f,250);
}f();
}*/
function openNewPage() {
var dates = document.querySelectorAll('[id^="thread"]');
for (var i = 0; i < dates.length; i++) {
var alreadyIn = dates[i].innerHTML;
console.log(alreadyIn.search('fa fa-bullseye mainc Tooltip') == -1);
console.log(alreadyIn.search('alreadyParticipate') == -1);
if (alreadyIn.search('alreadyParticipate') == -1 && alreadyIn.search('fa fa-bullseye mainc Tooltip') == -1) {
setTimeout(function (i) {
var num = dates[i].attributes.id.nodeValue;
var splits = num.split('-');
GM_openInTab('https://lolz.guru/threads/' + splits[1]);
}, 10000 * i, i);
}
}
}
openNewPage();
setTimeout(function(){ location.reload(); }, 100*1000);
И так же сохраняем.
Если вы все сделали правильно, то должно получиться так.
Теперь нужно открыть страницу розыгрышей и нажать F5 и немного подождать.
Anti-Captcha
- Регистрируемся на сайте https://anti-captcha.com/
- Скачиваем и устанавливаем расширение chrome/opera в extension anti-captcha.
- Вставляем api-key в расширение.
Автор: https://t.me/LZTautoClicker