WebCrawlerLoader

org.llm4s.rag.loader.WebCrawlerLoader
See theWebCrawlerLoader companion object
final case class WebCrawlerLoader(seedUrls: Seq[String], config: CrawlerConfig, metadata: Map[String, String]) extends DocumentLoader

Load documents by crawling from seed URLs.

Features:

  • Breadth-first link discovery
  • Domain/pattern restrictions
  • robots.txt support
  • Rate limiting
  • HTML to text conversion
  • Deduplication by URL

Value parameters

config

Crawler configuration

metadata

Additional metadata for all documents

seedUrls

Starting URLs to crawl from

Attributes

Companion
object
Source
WebCrawlerLoader.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

Human-readable description of this loader.

Human-readable description of this loader.

Used for logging and debugging.

Attributes

Source
WebCrawlerLoader.scala
override def estimatedCount: Option[Int]

Estimated number of documents (if known).

Estimated number of documents (if known).

Used for progress reporting and resource allocation. Returns None if count is unknown or expensive to compute.

Attributes

Definition Classes
Source
WebCrawlerLoader.scala

Load documents from this source.

Load documents from this source.

Returns an iterator of LoadResult for streaming large document sets. Each result is either a successfully loaded document or a loading error. This allows processing to continue even when some documents fail.

Attributes

Returns

Iterator of load results (successes and failures)

Source
WebCrawlerLoader.scala

Set rate limit delay

Set rate limit delay

Attributes

Source
WebCrawlerLoader.scala

Set exclude patterns

Set exclude patterns

Attributes

Source
WebCrawlerLoader.scala

Set follow patterns

Set follow patterns

Attributes

Source
WebCrawlerLoader.scala

Set max depth

Set max depth

Attributes

Source
WebCrawlerLoader.scala

Set max pages

Set max pages

Attributes

Source
WebCrawlerLoader.scala

Set maximum queue size

Set maximum queue size

Attributes

Source
WebCrawlerLoader.scala

Add metadata

Add metadata

Attributes

Source
WebCrawlerLoader.scala

Set whether to include query parameters

Set whether to include query parameters

Attributes

Source
WebCrawlerLoader.scala

Set whether to respect robots.txt

Set whether to respect robots.txt

Attributes

Source
WebCrawlerLoader.scala

Set whether to restrict to same domain

Set whether to restrict to same domain

Attributes

Source
WebCrawlerLoader.scala

Add a seed URL

Add a seed URL

Attributes

Source
WebCrawlerLoader.scala

Add multiple seed URLs

Add multiple seed URLs

Attributes

Source
WebCrawlerLoader.scala

Set request timeout

Set request timeout

Attributes

Source
WebCrawlerLoader.scala

Set the policy every seed, crawled link, redirect hop and robots.txt request is checked against

Set the policy every seed, crawled link, redirect hop and robots.txt request is checked against

Attributes

Source
WebCrawlerLoader.scala

Inherited methods

Combine this loader with another.

Combine this loader with another.

Creates a composite loader that loads from both sources.

Attributes

Inherited from:
DocumentLoader
Source
DocumentLoader.scala

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product