Skip to content

feat(components): add MrScraper integration - #14516

Open
ai-mrscraper wants to merge 15 commits into
langflow-ai:mainfrom
ai-mrscraper:feat/component-mrscraper
Open

feat(components): add MrScraper integration#14516
ai-mrscraper wants to merge 15 commits into
langflow-ai:mainfrom
ai-mrscraper:feat/component-mrscraper

Conversation

@ai-mrscraper

@ai-mrscraper ai-mrscraper commented Aug 12, 2026

Copy link
Copy Markdown

Summary

Adds MrScraper as an official lfx-bundles provider with eight components for AI scraping, website crawling, rendered HTML fetching, batch reruns, and result retrieval.

Components

  • MrScraper AI Agent Scraper
  • MrScraper Batch Scrape URLs
  • MrScraper Crawl Website
  • MrScraper Fetch Rendered HTML
  • MrScraper Get Result Detail
  • MrScraper Get Results
  • MrScraper Run AI Scraper
  • MrScraper Run Manual Scraper

Implementation

  • Provider code: src/bundles/lfx-bundles/src/lfx_bundles/mrscraper/
  • Tests: src/bundles/lfx-bundles/tests/test_mrscraper/
  • Optional dependency: lfx-bundles[mrscraper] using mrscraper-sdk>=0.1.2,<1.0.0
  • Structured component outputs use Data
  • SDK imports remain lazy and provide an actionable installation error
  • Adds the MrScraper icon and frontend palette registration

Validation

  • 22 MrScraper tests pass
  • 37 full lfx-bundles tests pass
  • Frozen LFX component-tree check passes
  • Bundle discovery loads all eight components
  • Component-index generation is stable
  • Ruff, Biome, secret detection, and all applicable pre-commit hooks pass

Links

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 8dc7392b-5705-408b-a548-4bee167c145e

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Walkthrough

Added optional MrScraper SDK support, eight LFX components, component-index registrations, frontend icon and bundle mappings, and unit tests for SDK calls, validation, defaults, and missing-dependency errors.

Changes

MrScraper package and registry

Layer / File(s) Summary
Package and component registry
src/backend/base/pyproject.toml, src/lfx/src/lfx/components/..., src/lfx/src/lfx/_assets/component_index.json
Added the optional SDK extra, lazy component exports, eight component registrations, and updated index metadata.
Scraping and crawl components
src/lfx/src/lfx/components/mrscraper/..., src/lfx/tests/unit/components/mrscraper/..., src/backend/tests/unit/components/bundles/mrscraper/...
Added AI scraping, batch scraping, website crawling, and rendered HTML components. Tests cover SDK delegation, validation, defaults, and returned data.
Result and rerun components
src/lfx/src/lfx/components/mrscraper/..., src/lfx/tests/unit/components/mrscraper/..., src/backend/tests/unit/components/bundles/mrscraper/...
Added result lookup, result listing, AI reruns, and manual reruns. Tests cover parameter forwarding and Data mapping.
Frontend bundle registration
src/frontend/src/icons/Mrscraper/*, src/frontend/src/icons/*Imports.ts, src/frontend/src/utils/styleUtils.ts
Added the MrScraper logo, icon loading mappings, sidebar bundle metadata, and node icon mapping.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant LangflowComponent
  participant MrScraperSDK
  participant Data
  LangflowComponent->>MrScraperSDK: Invoke scraping, crawling, retrieval, or rerun API
  MrScraperSDK-->>LangflowComponent: Return SDK response
  LangflowComponent->>Data: Wrap response as Data
Loading

Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (1 error, 1 warning)

Check name Status Explanation Resolution
Test Coverage For New Implementations ❌ Error The PR adds unit tests for all eight components, but it adds no MrScraper integration tests and no frontend test for the new icon/sidebar registration. Add an integration test module for the MrScraper SDK/component flow and frontend tests for icon loading and MrScraper sidebar registration.
Test Quality And Coverage ⚠️ Warning The PR adds the MrScraper sidebar and icon UI but no Playwright coverage; backend pytest tests cover the eight async components and SDK/error paths only. Add a Playwright test that opens Bundles, verifies MrScraper and its icon, and adds a MrScraper component to validate registration and rendering.
✅ Passed checks (7 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 93.18% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Test File Naming And Structure ✅ Passed Both added test modules use test_*.py under unit directories, pytest markers, descriptive names, setup hooks, and positive/negative cases; no frontend test file was added.
Excessive Mock Usage Warning ✅ Passed Both added suites mock only the external MrScraper SDK; assertions verify Data mapping, arguments, branches, validation, and missing-SDK errors, so mocks do not obscure core logic.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding the MrScraper integration and its components.
✨ Finishing Touches 💡 2
⚔️ Resolve merge conflicts 💡
  • Resolve merge conflict in branch feat/component-mrscraper
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/backend/tests/unit/components/bundles/mrscraper/test_mrscraper_components.py (1)

22-350: 📐 Maintainability & Code Quality | 🟠 Major | 🏗️ Heavy lift

Use the required component test base and fixtures.

These component test classes do not inherit ComponentTestBaseWithoutClient. They also do not define the required component_class, default_kwargs, and file_names_mapping fixtures.

Use ComponentTestBaseWithoutClient because these tests use mocked SDK clients and do not require API access. As per coding guidelines, “Component tests must use either ComponentTestBaseWithClient for components needing API access or ComponentTestBaseWithoutClient for pure logic components, and must include component_class, default_kwargs, and file_names_mapping fixtures.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@src/backend/tests/unit/components/bundles/mrscraper/test_mrscraper_components.py`
around lines 22 - 350, Update the Mrscraper component test classes to inherit
from ComponentTestBaseWithoutClient and add the required component_class,
default_kwargs, and file_names_mapping fixtures for each component. Preserve the
existing mocked SDK behavior and parameterized missing-SDK coverage while
conforming to the shared component test base contract.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In
`@src/backend/tests/unit/components/bundles/mrscraper/test_mrscraper_components.py`:
- Around line 22-350: Update the Mrscraper component test classes to inherit
from ComponentTestBaseWithoutClient and add the required component_class,
default_kwargs, and file_names_mapping fixtures for each component. Preserve the
existing mocked SDK behavior and parameterized missing-SDK coverage while
conforming to the shared component test base contract.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 351a81a9-1a13-425f-9641-faea24767b43

📥 Commits

Reviewing files that changed from the base of the PR and between 66659c4 and 360d266.

⛔ Files ignored due to path filters (2)
  • src/frontend/src/icons/Mrscraper/mrscraper.svg is excluded by !**/*.svg
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (23)
  • src/backend/base/pyproject.toml
  • src/backend/tests/unit/components/bundles/mrscraper/__init__.py
  • src/backend/tests/unit/components/bundles/mrscraper/conftest.py
  • src/backend/tests/unit/components/bundles/mrscraper/test_mrscraper_components.py
  • src/frontend/src/icons/Mrscraper/MrscraperIcon.jsx
  • src/frontend/src/icons/Mrscraper/index.tsx
  • src/frontend/src/icons/eagerIconImports.ts
  • src/frontend/src/icons/lazyIconImports.ts
  • src/frontend/src/utils/styleUtils.ts
  • src/lfx/src/lfx/_assets/component_index.json
  • src/lfx/src/lfx/components/__init__.py
  • src/lfx/src/lfx/components/mrscraper/__init__.py
  • src/lfx/src/lfx/components/mrscraper/mrscraper_ai_scraper.py
  • src/lfx/src/lfx/components/mrscraper/mrscraper_batch_scrape.py
  • src/lfx/src/lfx/components/mrscraper/mrscraper_crawl_website.py
  • src/lfx/src/lfx/components/mrscraper/mrscraper_fetch_html.py
  • src/lfx/src/lfx/components/mrscraper/mrscraper_get_result.py
  • src/lfx/src/lfx/components/mrscraper/mrscraper_get_results.py
  • src/lfx/src/lfx/components/mrscraper/mrscraper_run_ai_scraper.py
  • src/lfx/src/lfx/components/mrscraper/mrscraper_run_manual_scraper.py
  • src/lfx/tests/unit/components/mrscraper/__init__.py
  • src/lfx/tests/unit/components/mrscraper/conftest.py
  • src/lfx/tests/unit/components/mrscraper/test_mrscraper_components.py

@ai-mrscraper ai-mrscraper changed the title Feat/component mrscraper feat(components): add MrScraper integration Aug 12, 2026
@github-actions github-actions Bot added the enhancement New feature or request label Aug 12, 2026
@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Aug 12, 2026
@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants