It looks like you're working through a comprehensive tutorial or guide on using the Crawl4AI library to extract and process data from web pages. Let's break down what each part of your code does:
Part 10: Deep Crawling
In this section, you are demonstrating how to perform deep crawling (i.e., traversing multiple levels of a website) starting from a seed URL using the Breadth-First Search (BFS) strategy.
Key Components:
-
FilterChain: A chain of filters that can be applied to URLs during the crawl process. In your example, it includes
DomainFilterandURLPatternFilter.DomainFilter: Allows or blocks specific domains.URLPatternFilter: Matches URL patterns against a list of allowed/blocked patterns.
-
BFSDeepCrawlStrategy: A strategy for deep crawling that uses BFS to explore pages up to a certain depth or number of pages. It takes parameters like
max_depth,max_pages, and the filter chain. -
AsyncWebCrawler: The main class used for performing asynchronous web crawls.
Example Code:
python1from crawl4ai.deep_crawling import BFSDeepCrawl 2 3[Read the full article at MarkTechPost](https://www.marktechpost.com/2026/04/14/a-coding-implementation-of-crawl4ai-for-web-crawling-markdown-generation-javascript-execution-and-llm-based-structured-extraction/) 4 5--- 6 7**Want to create content about this topic?** [Use Nemati AI tools](https://nemati.ai) to generate articles, social posts, and more.

![[AINews] The Unreasonable Effectiveness of Closing the Loop](/_next/image?url=https%3A%2F%2Fmedia.nemati.ai%2Fmedia%2Fblog%2Fimages%2Farticles%2F600e22851bc7453b.webp&w=3840&q=75)



