A fork of HumanCursor that uses Botasaurus driver for human-like mouse movements.
HumanCursor-Botasaurus is a Python library that enables human-like mouse movements in web automation using the Botasaurus driver. It's designed to help you create more natural and less detectable web automation by simulating human-like cursor movements, clicks, and interactions.
This library is a fork of the original HumanCursor project, adapted to work with Botasaurus driver instead of Selenium.
- Human-like mouse movements using Bezier curves
- Randomized movement patterns to avoid detection
- Support for clicking, dragging, and scrolling with human-like behavior
- Easy integration with Botasaurus driver
- Customizable movement parameters
pip install humancursor-botasaurus
from botasaurus_driver import Driver
from humancursor_botasaurus import WebCursor
# Initialize Botasaurus driver
driver = Driver(headless=False)
# Navigate to a website
driver.get("https://www.example.com")
# Initialize HumanCursor
cursor = WebCursor(driver)
# Find an element
button = driver.select("button.login")
# Move to the element and click it with human-like movement
cursor.click_on(button)
# Close the driver
driver.close()
from botasaurus_driver import Driver
from humancursor_botasaurus import WebCursor
# Initialize Botasaurus driver
driver = Driver(headless=False)
# Navigate to a website
driver.get("https://www.example.com")
# Initialize HumanCursor
cursor = WebCursor(driver)
# Show the cursor (adds a red dot to visualize movements)
cursor.show_cursor()
# Find elements
input_field = driver.select("input[name='username']")
login_button = driver.select("button.login")
# Move to the input field with human-like movement and click
cursor.click_on(input_field)
# Type something (using Botasaurus's type method)
driver.type("input[name='username']", "example_user")
# Find password field and click on it
password_field = driver.select("input[name='password']")
cursor.click_on(password_field)
# Type password
driver.type("input[name='password']", "example_password")
# Move to login button and click
cursor.click_on(login_button)
# Close the driver
driver.close()
from botasaurus_driver import Driver
from humancursor_botasaurus import WebCursor
# Initialize Botasaurus driver
driver = Driver(headless=False)
# Navigate to a website
driver.get("https://www.example.com/drag-and-drop")
# Initialize HumanCursor
cursor = WebCursor(driver)
# Find elements
drag_element = driver.select("#draggable")
drop_target = driver.select("#droppable")
# Perform drag and drop with human-like movement
cursor.drag_and_drop(drag_element, drop_target)
# Close the driver
driver.close()
- Original HumanCursor project by zajcikk
- Botasaurus by omkarcloud
This project is licensed under the MIT License - see the LICENSE file for details.
If you would like to support this project, please consider buying me a coffee: