Official Crawl4AI Cloud: a hosted web scraping, extraction, and search API for AI agents. Free API key, 1,000 credits a month, no card. Fully open source: this repo is the Apache-2.0 crawler that powers it, and you can self-host it.
Python aiai-agentscrawl4ai-cloudcrawlerdata-extractionllmmarkdownmcpopen-sourceplaywrightpythonragscraperweb-crawlerweb-crawlingweb-scraping
fix: preserve .tail text when removing empty elements (#1938)
ntohidie8f1af7c1689
diff --git a/crawl4ai/content_scraping_strategy.py b/crawl4ai/content_scraping_strategy.pyindex 9853f788..9cdc53cf 100644--- a/crawl4ai/content_scraping_strategy.py+++ b/crawl4ai/content_scraping_strategy.py@@ -562,6 +562,14 @@ class LXMLWebScrapingStrategy(ContentScrapingStrategy):):parent = el.getparent()if parent is not None:+ # Preserve .tail text before removing the element+ tail = el.tail+ if tail:+ prev = el.getprevious()+ if prev is not None:+ prev.tail = (prev.tail or "") + tail+ else:+ parent.text = (parent.text or "") + tailparent.remove(el)return root