silkworm.exceptions¶
- exception silkworm.exceptions.SilkwormError[source]¶
Bases:
ExceptionBase exception for the framework.
- exception silkworm.exceptions.HttpError[source]¶
Bases:
SilkwormErrorRaised when an HTTP request fails.
- exception silkworm.exceptions.HttpTimeoutError[source]¶
Bases:
HttpErrorRaised when an HTTP request exceeds its timeout; usually transient.
- exception silkworm.exceptions.HttpConnectionError[source]¶
Bases:
HttpErrorRaised when the transport fails (DNS, connect, reset); usually transient.
- exception silkworm.exceptions.ResponseTooLargeError[source]¶
Bases:
HttpErrorRaised when a response body exceeds the configured size limit.
- exception silkworm.exceptions.SpiderError[source]¶
Bases:
SilkwormErrorRaised when a spider callback errors.
- exception silkworm.exceptions.BatchPipelineError[source]¶
Bases:
SilkwormErrorRaised when a backend rejects one or more items from a bulk request.
- exception silkworm.exceptions.SelectorError[source]¶
Bases:
SilkwormErrorRaised when CSS/XPath selector evaluation fails.
- exception silkworm.exceptions.MarkdownConversionError[source]¶
Bases:
SilkwormErrorRaised when HTML to Markdown conversion fails.
- exception silkworm.exceptions.IgnoreRequest[source]¶
Bases:
SilkwormErrorRaise from a request or response middleware to drop a request silently.
Ignored requests are counted under
ignored_requests(labelled byreason) and are neither errors nor passed to errbacks.- Parameters:
message – Human-readable explanation used in debug logs.
reason – Short, low-cardinality label used in statistics.
- exception silkworm.exceptions.DropItem[source]¶
Bases:
SilkwormErrorRaise from an item pipeline to discard an item.
Later pipelines are skipped, the item is counted under
items_dropped(labelled byreason), andemit()returns normally.- Parameters:
message – Human-readable explanation used in logs.
reason – Short, low-cardinality label used in statistics.
- exception silkworm.exceptions.CloseSpider[source]¶
Bases:
SilkwormErrorRaise from a callback, middleware, or pipeline to stop the crawl gracefully.
Pending requests are discarded (or kept for resuming when a job directory is configured), in-flight requests finish, and the crawl result reports
reasonas its close reason.
- exception silkworm.exceptions.CrawlFailedError[source]¶
Bases:
SilkwormErrorRaised by
Engine.run()when the crawl violates its failure policy.- result¶
The complete
CrawlResult, including the policy violations inresult.failures.
- __init__(result)[source]¶
- Parameters:
result (CrawlResult)
- Return type:
None