THIS PROJECT IS NO LONGER ACTIVE. PLEASE USE python_ghost_cursor INSTEAD.
Pyppeteer Ghost Cursor
Python port of Xetera/ghost-cursor, for use with pyppeteer.
Generate realistic, human-like mouse movement data between coordinates or navigate between elements with puppeteer
like the definitely-not-robot you are.
Installation
pip install pyppeteer_ghost_cursor
Usage
Generating movement data between 2 coordinates.
from pyppeteer_ghost_cursor import path
start = {
"x": 220,
"y": 402,
}
end = {
"x": 902,
"y": 1032,
}
route = path(start, end)
Usage with pyppeteer:
from pyppeteer_ghost_cursor import createCursor
import pyppeteer
async def main(url):
selector = "#sign-up button"
browser = await pyppeteer.launch(headless=False)
page = await browser.newPage()
cursor = createCursor(page)
await page.goto(url)
await page.waitForSelector(selector)
await cursor.click(selector)
More info
The original repo gives a description of some of the cool features, along with a good explanation of how it works.