Skip to main content

A CrewAI custom tool for automatically exporting multi-tab reports from portals using Playwright.

Project description

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)

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

crewai_playwright_export-0.1.1.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

crewai_playwright_export-0.1.1-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file crewai_playwright_export-0.1.1.tar.gz.

File metadata

File hashes

Hashes for crewai_playwright_export-0.1.1.tar.gz
Algorithm Hash digest
SHA256 50d8cb036c1ccd3d33b003aa3b1112e24ae460c515a6d317a776aa5a22c3f076
MD5 463a8fedfea92c0f2f5f011b492f6870
BLAKE2b-256 9d9d76a410f921cfcc042b00784c45adceb022036fc4fd6661faac170236e7ef

See more details on using hashes here.

File details

Details for the file crewai_playwright_export-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for crewai_playwright_export-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 88dc12c727836fb1b7151a091c033774f9d0394fdbe8432ee5c70bedbb9b7c31
MD5 874d4eb1f4b75d6416e1f81de14e9acd
BLAKE2b-256 a5292d6c62336dbd658ba8d5cb00cc67b3c4bd45e7f36aea83fbac4d07a06a57

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page