crewai-playwright-export
A custom CrewAI tool for automated multi-tab report exporting from portals using Playwright.
This tool logs into a specified web portal, automatically discovers all report subpage links, traverses them in separate browser tabs, performs scroll-based dynamic selector searching, exports the CSV reports, and manages download state and tab lifecycles.
Features
- Multi-Tab Execution: Traverses and exports report pages in isolated browser tabs.
- Session Auth Injection: Automatically propagates active session credentials (
sessionStorage) into newly opened tabs to bypass redirect guards. - Automatic Navigation: Automatically traverses report lists to inner detail pages.
- Dynamic Scrolling: Scrolls down in 300px increments to locate Export buttons.
- Pydantic Validation: Input argument checking.
Installation
Install the package using pip:
pip install crewai-playwright-export
Ensure Playwright browser drivers are installed:
playwright install chromium
Usage
from crewai import Agent, Task, Crew
from crewai_playwright_export import ExportReportsTool
# Instantiate the custom tool
export_tool = ExportReportsTool()
# Define the Agent
automation_agent = Agent(
role="Data Export Specialist",
goal="Collect and export all tabular reports from the portal",
backstory="An automated script operator specialized in extraction.",
tools=[export_tool],
verbose=True
)
# Define the Task
export_task = Task(
description="Export all campaign performance reports from https://gokulraj-v12.github.io/InterEQ/",
expected_output="Log of successful CSV exports.",
agent=automation_agent,
)
# Run the Crew
crew = Crew(agents=[automation_agent], tasks=[export_task])
result = crew.kickoff()
print(result)
Metadata
Release files for crewai-playwright-export 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| crewai_playwright_export-0.1.1.tar.gz | 3.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| crewai_playwright_export-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.5 kB
Release files / crewai_playwright_export-0.1.1.tar.gz
| Download URL | crewai_playwright_export-0.1.1.tar.gz |
|---|---|
| Size | 3.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
50d8cb036c1ccd3d33b003aa3b1112e24ae460c515a6d317a776aa5a22c3f076
|
|
BLAKE2b-256 checksum How to use checksums |
9d9d76a410f921cfcc042b00784c45adceb022036fc4fd6661faac170236e7ef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.4
|
Release files / crewai_playwright_export-0.1.1-py3-none-any.whl
| Download URL | crewai_playwright_export-0.1.1-py3-none-any.whl |
|---|---|
| Size | 4.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
88dc12c727836fb1b7151a091c033774f9d0394fdbe8432ee5c70bedbb9b7c31
|
|
BLAKE2b-256 checksum How to use checksums |
a5292d6c62336dbd658ba8d5cb00cc67b3c4bd45e7f36aea83fbac4d07a06a57
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.4
|