Skip to content

HumanCursorBotasaurus is a playful, interactive bot that transforms everyday cursor movements into engaging, dynamic experiences. It leverages creative design and intuitive technology to bring a fun twist to user interactions

License

Notifications You must be signed in to change notification settings

iLeaf30/HumanCursorBotasaurus

Repository files navigation

HumanCursor-Botasaurus

A fork of HumanCursor that uses Botasaurus driver for human-like mouse movements.

Description

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.

Features

  • 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

Installation

pip install humancursor-botasaurus

Usage

Basic Example

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()

Advanced Usage

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()

Drag and Drop Example

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()

Credits

License

This project is licensed under the MIT License - see the LICENSE file for details.

Donate

If you would like to support this project, please consider buying me a coffee:

Buy Me A Coffee

Buy Me A Coffee

About

HumanCursorBotasaurus is a playful, interactive bot that transforms everyday cursor movements into engaging, dynamic experiences. It leverages creative design and intuitive technology to bring a fun twist to user interactions

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages