browseek


Namebrowseek JSON
Version 0.1.7 PyPI version JSON
download
home_pagehttps://www.browseek.com
SummaryAdvanced multi-browser automation library
upload_time2024-10-17 12:55:54
maintainerNone
docs_urlNone
authorTom Sapletta
requires_pythonNone
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Browseek: Advanced Multi-Browser Automation Library

Browseek is a sophisticated Python library designed for advanced multi-task and multi-browser automation. It provides a robust solution for managing complex web automation scenarios, including request redirection, DNS security, CAPTCHA handling, device simulation, and fine-grained network control.

## Table of Contents

- [Installation](#installation)
- [Quick Start](#quick-start)
- [Getting Started with Docker](#getting-started-with-docker)
- [Core Concepts](#core-concepts)
- [API Reference](#api-reference)
- [Configuration](#configuration)
- [Examples](http://python.browseek.com/EXAMPLES.md)
- [Contributing](http://python.browseek.com/CONTRIBUTING.md)
- [Testing](http://python.browseek.com/TESTING.md)
- [Changelog](http://python.browseek.com/CHANGELOG.md)

## Installation

```bash
pip install browseek
```

## Quick Start

```python
from browseek import BrowserRouter

# Initialize the router
router = BrowserRouter()

# Add browser instances
router.add_browser("chrome", count=2)
router.add_browser("firefox", count=1)

# Use the router to perform a task
result = router.execute("https://example.com", lambda page: page.title())
print(result)

# Clean up
router.close()
```

## Getting Started with Docker

To start the Browseek library using Docker, please refer to the [DOCKER.md](DOCKER.md) file for detailed instructions.

## Core Concepts

- **BrowserRouter**: The main class for managing browser instances and routing requests.
- **BrowserInstance**: Represents a single headless browser instance.
- **Route**: Defines rules for how specific requests should be handled.
- **Task**: A unit of work to be executed in a browser instance.

## API Reference

### BrowserRouter

```python
class BrowserRouter:
    def __init__(self, config: Dict[str, Any] = None):
        """Initialize the BrowserRouter with optional configuration."""

    def add_browser(self, browser_type: str, count: int = 1, options: Dict[str, Any] = None):
        """Add browser instances to the router."""

    def remove_browser(self, browser_id: str):
        """Remove a browser instance from the router."""

    def add_route(self, pattern: str, handler: Callable):
        """Add a route for specific URL patterns."""

    def execute(self, url: str, task: Callable, timeout: int = 30):
        """Execute a task on a suitable browser instance."""

    def close(self):
        """Close all browser instances and clean up resources."""
```

### BrowserInstance

```python
class BrowserInstance:
    def __init__(self, browser_type: str, options: Dict[str, Any] = None):
        """Initialize a browser instance."""

    def navigate(self, url: str):
        """Navigate to a specific URL."""

    def execute_script(self, script: str):
        """Execute JavaScript in the browser context."""

    def take_screenshot(self) -> bytes:
        """Capture a screenshot of the current page."""
```

## Configuration

Browseek can be configured via a Python dictionary or a YAML file:

```python
config = {
    "max_concurrent_browsers": 5,
    "default_timeout": 30,
    "retry_attempts": 3,
    "proxy": {
        "enabled": True,
        "rotate_on_failure": True
    }
}

router = BrowserRouter(config)
```

## Examples

For detailed examples of how to use Browseek for various scenarios, please refer to the [EXAMPLES.md](http://python.browseek.com/EXAMPLES.md) file.

## Contributing

We welcome contributions to Browseek! Please see our [Contributing Guide](http://python.browseek.com/CONTRIBUTING.md) for more information on how to get started.

## Testing

Browseek uses the `unittest` framework for testing. For information on running tests and writing new tests, please refer to the [TESTING.md](http://python.browseek.com/TESTING.md) file.

## Changelog

For a detailed list of changes and version history, please see the [CHANGELOG.md](http://python.browseek.com/CHANGELOG.md) file.

            

Raw data

            {
    "_id": null,
    "home_page": "https://www.browseek.com",
    "name": "browseek",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": null,
    "author": "Tom Sapletta",
    "author_email": "info@softreck.dev",
    "download_url": "https://files.pythonhosted.org/packages/d6/58/e3f9c39c27b8f7b04aab6a7febf7605299a02f007e84aaec49a7b50307a9/browseek-0.1.7.tar.gz",
    "platform": null,
    "description": "# Browseek: Advanced Multi-Browser Automation Library\n\nBrowseek is a sophisticated Python library designed for advanced multi-task and multi-browser automation. It provides a robust solution for managing complex web automation scenarios, including request redirection, DNS security, CAPTCHA handling, device simulation, and fine-grained network control.\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Quick Start](#quick-start)\n- [Getting Started with Docker](#getting-started-with-docker)\n- [Core Concepts](#core-concepts)\n- [API Reference](#api-reference)\n- [Configuration](#configuration)\n- [Examples](http://python.browseek.com/EXAMPLES.md)\n- [Contributing](http://python.browseek.com/CONTRIBUTING.md)\n- [Testing](http://python.browseek.com/TESTING.md)\n- [Changelog](http://python.browseek.com/CHANGELOG.md)\n\n## Installation\n\n```bash\npip install browseek\n```\n\n## Quick Start\n\n```python\nfrom browseek import BrowserRouter\n\n# Initialize the router\nrouter = BrowserRouter()\n\n# Add browser instances\nrouter.add_browser(\"chrome\", count=2)\nrouter.add_browser(\"firefox\", count=1)\n\n# Use the router to perform a task\nresult = router.execute(\"https://example.com\", lambda page: page.title())\nprint(result)\n\n# Clean up\nrouter.close()\n```\n\n## Getting Started with Docker\n\nTo start the Browseek library using Docker, please refer to the [DOCKER.md](DOCKER.md) file for detailed instructions.\n\n## Core Concepts\n\n- **BrowserRouter**: The main class for managing browser instances and routing requests.\n- **BrowserInstance**: Represents a single headless browser instance.\n- **Route**: Defines rules for how specific requests should be handled.\n- **Task**: A unit of work to be executed in a browser instance.\n\n## API Reference\n\n### BrowserRouter\n\n```python\nclass BrowserRouter:\n    def __init__(self, config: Dict[str, Any] = None):\n        \"\"\"Initialize the BrowserRouter with optional configuration.\"\"\"\n\n    def add_browser(self, browser_type: str, count: int = 1, options: Dict[str, Any] = None):\n        \"\"\"Add browser instances to the router.\"\"\"\n\n    def remove_browser(self, browser_id: str):\n        \"\"\"Remove a browser instance from the router.\"\"\"\n\n    def add_route(self, pattern: str, handler: Callable):\n        \"\"\"Add a route for specific URL patterns.\"\"\"\n\n    def execute(self, url: str, task: Callable, timeout: int = 30):\n        \"\"\"Execute a task on a suitable browser instance.\"\"\"\n\n    def close(self):\n        \"\"\"Close all browser instances and clean up resources.\"\"\"\n```\n\n### BrowserInstance\n\n```python\nclass BrowserInstance:\n    def __init__(self, browser_type: str, options: Dict[str, Any] = None):\n        \"\"\"Initialize a browser instance.\"\"\"\n\n    def navigate(self, url: str):\n        \"\"\"Navigate to a specific URL.\"\"\"\n\n    def execute_script(self, script: str):\n        \"\"\"Execute JavaScript in the browser context.\"\"\"\n\n    def take_screenshot(self) -> bytes:\n        \"\"\"Capture a screenshot of the current page.\"\"\"\n```\n\n## Configuration\n\nBrowseek can be configured via a Python dictionary or a YAML file:\n\n```python\nconfig = {\n    \"max_concurrent_browsers\": 5,\n    \"default_timeout\": 30,\n    \"retry_attempts\": 3,\n    \"proxy\": {\n        \"enabled\": True,\n        \"rotate_on_failure\": True\n    }\n}\n\nrouter = BrowserRouter(config)\n```\n\n## Examples\n\nFor detailed examples of how to use Browseek for various scenarios, please refer to the [EXAMPLES.md](http://python.browseek.com/EXAMPLES.md) file.\n\n## Contributing\n\nWe welcome contributions to Browseek! Please see our [Contributing Guide](http://python.browseek.com/CONTRIBUTING.md) for more information on how to get started.\n\n## Testing\n\nBrowseek uses the `unittest` framework for testing. For information on running tests and writing new tests, please refer to the [TESTING.md](http://python.browseek.com/TESTING.md) file.\n\n## Changelog\n\nFor a detailed list of changes and version history, please see the [CHANGELOG.md](http://python.browseek.com/CHANGELOG.md) file.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Advanced multi-browser automation library",
    "version": "0.1.7",
    "project_urls": {
        "Homepage": "https://www.browseek.com"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0b5902a836fad81fe511086efed912811cf5b6f0e8b3979f7218bde15dda5a3f",
                "md5": "855990e4bfd12c1c47c1c4115e217af9",
                "sha256": "cb4ea027756493a211c4c571137749b276d002e2ca879c7630854ea3d924ebc5"
            },
            "downloads": -1,
            "filename": "browseek-0.1.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "855990e4bfd12c1c47c1c4115e217af9",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 11588,
            "upload_time": "2024-10-17T12:55:53",
            "upload_time_iso_8601": "2024-10-17T12:55:53.281473Z",
            "url": "https://files.pythonhosted.org/packages/0b/59/02a836fad81fe511086efed912811cf5b6f0e8b3979f7218bde15dda5a3f/browseek-0.1.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d658e3f9c39c27b8f7b04aab6a7febf7605299a02f007e84aaec49a7b50307a9",
                "md5": "a00201160ceebf6005f3ba050e2a1dcd",
                "sha256": "892915d60cee4403003664d9146e112483619e3c413710d7619b5a2b8a6f490a"
            },
            "downloads": -1,
            "filename": "browseek-0.1.7.tar.gz",
            "has_sig": false,
            "md5_digest": "a00201160ceebf6005f3ba050e2a1dcd",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 12739,
            "upload_time": "2024-10-17T12:55:54",
            "upload_time_iso_8601": "2024-10-17T12:55:54.498274Z",
            "url": "https://files.pythonhosted.org/packages/d6/58/e3f9c39c27b8f7b04aab6a7febf7605299a02f007e84aaec49a7b50307a9/browseek-0.1.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-17 12:55:54",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "browseek"
}
        
Elapsed time: 0.54210s