src/api/instagram.js
/**
     * Manipulate the page to stimulate a request
     */
Manipulate the page to stimulate a request
Manipulate the page to stimulate a request
async jump() {
        await this.page.keyboard.press("PageUp");
        const jumpSize = this.graft ? 1 : this.jumpSize;
        for (let i = 0; i < jumpSize; i++) {
            await this.page.keyboard.press("End");
        }
        const width = this.page.viewport()["width"];
        const height = this.page.viewport()["height"];
        await this.page.mouse.move(Math.round(width * Math.random()), Math.round(height * Math.random()));
        ++this.jumps;
    }
async jump ( ) { await this . page . keyboard . press ( "PageUp" ) ; const jumpSize = this . graft ? 1 : this . jumpSize ; for ( let i = 0 ; i < jumpSize ; i ++ ) { await this . page . keyboard . press ( "End" ) ; } const width = this . page . viewport ( ) [ "width" ] ; const height = this . page . viewport ( ) [ "height" ] ; await this . page . mouse . move ( Math . round ( width * Math . random ( ) ) , Math . round ( height * Math . random ( ) ) ) ; ++ this . jumps ; }
Manipulate the page to stimulate a request
Manipulate the page to stimulate a request
// Move mouse randomly