Files
Jackett/docs/schema-definitions-selectorblock.md

7.9 KiB

SelectorBlock Schema

Cardigann#/definitions/SelectorBlock

Extracts a value from a response using a CSS selector (HTML) or path (JSON/XML), then applies case, remove and filters.

Abstract Extensible Status Identifiable Custom Properties Additional Properties Access Restrictions Defined In
Can be instantiated No Unknown status No Forbidden Forbidden none schema.json*

SelectorBlock Type

object (SelectorBlock)

all of

SelectorBlock Properties

Property Type Required Nullable Defined by
selector string Optional cannot be null Cardigann indexer definition
attribute string Optional cannot be null Cardigann indexer definition
optional boolean Optional cannot be null Cardigann indexer definition
default Merged Optional cannot be null Cardigann indexer definition
case object Optional cannot be null Cardigann indexer definition
remove string Optional cannot be null Cardigann indexer definition
text Merged Optional cannot be null Cardigann indexer definition
filters array Optional cannot be null Cardigann indexer definition

selector

CSS selector for HTML, or path for JSON/XML. :has(), :not() and :contains() are supported. In JSON, $ refers to the root object and a .. prefix reads from the row instead of the rows attribute subset.

selector

selector Type

string (Selector)

attribute

Take the value of this attribute (for example, href) instead of the element text.

attribute

attribute Type

string (Attribute)

optional

Do not fail if the selector does not match. Use with default.

optional

optional Type

boolean (Optional)

default

Value used when an optional selector does not match. Templates are allowed, for example, "{{ .Result.title_default }}".

default

default Type

merged type (Default)

one (and only one) of

case

Selector: value pairs. The value of the first matching selector is used. "*" matches anything. Common for downloadvolumefactor and uploadvolumefactor.

case

case Type

object (Case (SelectorBlock))

remove

Selector for elements to remove before reading the text. Removed elements are gone for all later fields, so put fields using remove last.

remove

remove Type

string (Remove)

text

Fixed value, or a template. Used instead of selector, such as for minimumratio and minimumseedtime.

text

text Type

merged type (Text)

one (and only one) of

filters

Filters applied to the extracted value, in order.

filters

filters Type

object[] (FilterBlock)