Pyppeteer implementation of Xetera/ghost-cursor
Project description
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)
# [
# { "x": 100, "y": 100 },
# { "x": 108.75573501957051, "y": 102.83608396351725 },
# { "x": 117.54686481838543, "y": 106.20019239793275 },
# { "x": 126.3749821408895, "y": 110.08364505509256 },
# { "x": 135.24167973152743, "y": 114.47776168684264 }
# ... and so on
# ]
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.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pyppeteer_ghost_cursor-0.2.3.tar.gz
.
File metadata
- Download URL: pyppeteer_ghost_cursor-0.2.3.tar.gz
- Upload date:
- Size: 8.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b3753ec6d2bec5fc4eb8e1f846003c581c814e3edabb5509cc3c4e9d9bdac89b |
|
MD5 | 66ef254cf6737933b399e27a3ae14efb |
|
BLAKE2b-256 | 00548433889a49276662fa0df3f2c693b1cdabf2b5c38eb1c3c56f4e97994c97 |
File details
Details for the file pyppeteer_ghost_cursor-0.2.3-py3-none-any.whl
.
File metadata
- Download URL: pyppeteer_ghost_cursor-0.2.3-py3-none-any.whl
- Upload date:
- Size: 21.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 85e6a4de482d14fe330eabaed582460b19aa61d8cb65b0ac67f776b13e9a6b2a |
|
MD5 | c753b68fb74529b867fdb09ad636fe2b |
|
BLAKE2b-256 | 9e3e3e4adeade2145a163ae4640a576ee2c24e2293a6081d1bc39dd6b193ee89 |