def _create_mock_scrape_result(markdown_content: str, web_entity: WebEntity):
    """Create a mock scrape result object that mimics Firecrawl's response."""

    class MockScrapeResult:
        def __init__(self, markdown_content: str):
            self.markdown = markdown_content

            # Try to extract title from markdown content
            title = None
            lines = markdown_content.split("\n")
            for line in lines[:10]:  # Check first 10 lines
                if line.strip().startswith("# "):
                    title = line.strip()[2:].strip()
                    break

            self.metadata = {
                "source": "azure_storage",
                "retrieved_from_cache": True,
                "title": title or f"Clinical Trial {web_entity.entity_id.split(':')[-1]}",
            }

    return MockScrapeResult(markdown_content)
Create a mock scrape result object that mimics Firecrawl's response.
backend/airweave/platform/transformers/web_fetcher.py