Auto Peer Review

Toolyx
by Toolyx · 9 posts
8 months ago in Javascript
Posted 8 months ago · Author
Chrome Extension: https://chromewebstore.google.com/detai ... fdacpbcbam

Fully able to leave it running in the background.

Code
function waitForElement(selector, timeout = 30000) {
    return new Promise(function(resolve, reject) {
        const intervalTime = 100;
        let elapsedTime = 0;
        const interval = setInterval(() => {
            const element = document.querySelector(selector);
            if (element) {
                clearInterval(interval);
                resolve(element);
            } else if (elapsedTime >= timeout) {
                clearInterval(interval);
                reject(new Error(`Element ${selector} not found within ${timeout}ms`));
            }
            elapsedTime += intervalTime;
        }, intervalTime);
    });
}

async function clickWhenAvailable(selector, retryDelay = 5000, maxRetries = 5) {
    for (let i = 0; i < maxRetries; i++) {
        try {
            const element = await waitForElement(selector);
            element.click();
            return true;
        } catch (error) {
            console.warn(`Attempt ${i + 1}: ${error.message}`);
            if (i < maxRetries - 1) {
                await new Promise(resolve => setTimeout(resolve, retryDelay));
            }
        }
    }
    alert(`Failed to find or click the element: ${selector}`);
    return false;
}

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

async function automatePeerReviewProcess() {
    if (localStorage.getItem('waitingAfterVote') === 'true') {
        console.log("Waiting period detected. Pausing execution...");
        await delay(30000);
        localStorage.removeItem('waitingAfterVote');
    }

    if (window.location.href.includes("https://www.imvu.com/peer_review/") && !window.location.search) {
        await clickWhenAvailable('#view_in_3d', 5000, 6);
        await delay(15000);
    }

    if (window.location.href.includes("https://www.imvu.com/next/peer_review/")) {
        await clickWhenAvailable('a.peer-review-submit-button', 5000, 6);
        await delay(10000);
    } else if (window.location.href.includes("https://www.imvu.com/peer_review/") && window.location.search.includes("review_id=")) {
        await delay(5000);
    }

    const noIssuesChecked = await clickWhenAvailable('#cb_no_issues', 2000, 6);
    if (noIssuesChecked) {
        const voteSubmitted = await clickWhenAvailable('button.submit-vote.pass', 2000, 6);
        if (voteSubmitted) {
            console.log("Vote submitted successfully.");
            localStorage.setItem('waitingAfterVote', 'true');
            await delay(30000);
        }
    }

    if (localStorage.getItem('waitingAfterVote') !== 'true') {
        automatePeerReviewProcess();
    }
}

automatePeerReviewProcess();
Last edited by Toolyx on Thu Feb 22, 2024 7:23 am, edited 1 time in total.
Posted 8 months ago
Ty Brother !!!!
Posted 8 months ago
10/10 Thank you Tooly
Posted 8 months ago
gg, good work !!
Posted 8 months ago
Great work man, thanks for sharing this.
Posted 8 months ago
Thank you so much
Posted 8 months ago
error:
VM501:26 Attempt 1: Element #cb_no_issues not found within 30000ms
Posted 8 months ago
bro this is like a really helpful one. TYSM!!
Posted 8 months ago · Author
@DMITRY ROMANOV


IMVU has implemented a recaptcha system to combat botting activities. I could develop a version 2 of the tool that includes a captcha bypass feature. However, each captcha solve would incur a cost. Considering this, the value of implementing such a feature is questionable unless I don't have a clear understanding of its worth.
For those interested in exploring captcha bypass solutions independently, you might want to check out Capsolver at https://www.capsolver.com/


I'll look into it again tho, I might be able to make a bypass without capsolver.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Sign in

Already have an account? Sign in here

SIGN IN NOW

Create an account

Sign up for a new account in our community. It's easy!

REGISTER A NEW ACCOUNT