mirror of
https://github.com/Jackett/Jackett
synced 2025-01-03 05:36:44 +00:00
Updated Definition format (markdown)
parent
1032be3f0b
commit
a1c3179ec6
1 changed files with 21 additions and 0 deletions
|
@ -636,6 +636,27 @@ In the event that you need to provide a default category due to the possibility
|
||||||
selector: a.label[href*="type="]
|
selector: a.label[href*="type="]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### Providing other fields with a default value
|
||||||
|
|
||||||
|
In the event that a field (other than category) might not be reliably present from the site results, you can use the `default` statement, as shown in these examples:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
title_default:
|
||||||
|
# this title may be abbreviated
|
||||||
|
selector: a[href^="details.php?id="]
|
||||||
|
title:
|
||||||
|
# this title if present is full length
|
||||||
|
selector: a[title][href^="details.php?id="]
|
||||||
|
attribute: title
|
||||||
|
optional: true
|
||||||
|
default: "{{ .Result.title_default }}"
|
||||||
|
seeders:
|
||||||
|
# seeders may be missing
|
||||||
|
selector: a[href$="toseeders=1"]
|
||||||
|
optional: true
|
||||||
|
default: 0
|
||||||
|
```
|
||||||
|
|
||||||
### Search JSON
|
### Search JSON
|
||||||
|
|
||||||
Example of a complex search block explaining all available options:
|
Example of a complex search block explaining all available options:
|
||||||
|
|
Loading…
Reference in a new issue