diff --git a/src/Jackett.Common/Definitions/anime-free.yml b/src/Jackett.Common/Definitions/anime-free.yml index f3627ad81..5df77e57a 100644 --- a/src/Jackett.Common/Definitions/anime-free.yml +++ b/src/Jackett.Common/Definitions/anime-free.yml @@ -88,11 +88,10 @@ search: selector: article fields: - category: + category_optional: + optional: true selector: a[href*="category="] attribute: href - optional: true - default: 54 case: a[href$="3d_hentai"]: 51 a[href$="3dcg_game"]: 55 @@ -111,6 +110,8 @@ search: a[href$="original_hentai"]: 48 a[href$="rus-game"]: 57 a[href$="uncensored"]: 45 + category: + text: "{{ if .Result.category_optional }}{{ .Result.category_optional }}{{ else }}54{{ end }}" title: selector: h2.title a details: diff --git a/src/Jackett.Common/Definitions/asiandvdclub.yml b/src/Jackett.Common/Definitions/asiandvdclub.yml index 6ea4cf8de..2c0b2f824 100644 --- a/src/Jackett.Common/Definitions/asiandvdclub.yml +++ b/src/Jackett.Common/Definitions/asiandvdclub.yml @@ -91,11 +91,10 @@ search: selector: table.torrenttable_helper > tbody > tr:has(img) fields: - category: + category_optional: selector: img[class^="cat-"] attribute: class optional: true - default: 12 case: img.cat-anime: 1 img.cat-hk: 2 @@ -113,6 +112,8 @@ search: img.cat-pinku: 12 img.cat-drama: 15 img.cat-ost: 16 + category: + text: "{{ if .Result.category_optional }}{{ .Result.category_optional }}{{ else }}12{{ end }}" title: selector: span[id] details: diff --git a/src/Jackett.Common/Definitions/bestcore.yml b/src/Jackett.Common/Definitions/bestcore.yml index 6e9a2bc88..7ca882308 100644 --- a/src/Jackett.Common/Definitions/bestcore.yml +++ b/src/Jackett.Common/Definitions/bestcore.yml @@ -123,14 +123,15 @@ search: - name: andmatch fields: - category: + category_optional: selector: a[href^="browse.php?cat="] attribute: href optional: true - default: 38 filters: - name: querystring args: cat + category: + text: "{{ if .Result.category_optional }}{{ .Result.category_optional }}{{ else }}38{{ end }}" title_default: # can be abbreviated selector: a[href^="details.php?id="] diff --git a/src/Jackett.Common/Definitions/crackingpatching.yml b/src/Jackett.Common/Definitions/crackingpatching.yml index 1250be9ef..ffaf35d7b 100644 --- a/src/Jackett.Common/Definitions/crackingpatching.yml +++ b/src/Jackett.Common/Definitions/crackingpatching.yml @@ -65,14 +65,15 @@ search: - name: andmatch fields: - category: + category_optional: selector: article.post-entry attribute: class optional: true - default: other filters: - name: regexp args: "category-(.+?) " + category: + text: "{{ if .Result.category_optional }}{{ .Result.category_optional }}{{ else }}other{{ end }}" title: selector: h2 > a details: diff --git a/src/Jackett.Common/Definitions/exttorrents.yml b/src/Jackett.Common/Definitions/exttorrents.yml index a2a3f9010..b92be5e95 100644 --- a/src/Jackett.Common/Definitions/exttorrents.yml +++ b/src/Jackett.Common/Definitions/exttorrents.yml @@ -122,11 +122,12 @@ search: selector: table.table-striped > tbody > tr fields: - category: + category_optional: selector: td:nth-child(1) div div a:last-child attribute: href optional: true - default: "/other/" + category: + text: "{{ if .Result.category_optional }}{{ .Result.category_optional }}{{ else }}/other/{{ end }}" title: selector: td:nth-child(1) div a details: diff --git a/src/Jackett.Common/Definitions/glodls.yml b/src/Jackett.Common/Definitions/glodls.yml index 0470ef156..f654e5159 100644 --- a/src/Jackett.Common/Definitions/glodls.yml +++ b/src/Jackett.Common/Definitions/glodls.yml @@ -104,14 +104,15 @@ search: after: 1 fields: - category: + category_optional: selector: a[href^="/search.php?cat="] attribute: href optional: true - default: 33 filters: - name: querystring args: cat + category: + text: "{{ if .Result.category_optional }}{{ .Result.category_optional }}{{ else }}33{{ end }}" title: selector: td:nth-child(2) a[title] attribute: title diff --git a/src/Jackett.Common/Definitions/hellashut.yml b/src/Jackett.Common/Definitions/hellashut.yml index d97e64145..07360402c 100644 --- a/src/Jackett.Common/Definitions/hellashut.yml +++ b/src/Jackett.Common/Definitions/hellashut.yml @@ -149,14 +149,15 @@ search: selector: table.ttable_headinner tr.t-row fields: - category: + category_optional: selector: a[href*="cat="] attribute: href optional: true - default: 56 filters: - name: querystring args: cat + category: + text: "{{ if .Result.category_optional }}{{ .Result.category_optional }}{{ else }}56{{ end }}" title: selector: a[href^="torrents-details.php?id="] attribute: title diff --git a/src/Jackett.Common/Definitions/kickasstorrents-ws.yml b/src/Jackett.Common/Definitions/kickasstorrents-ws.yml index b8b2e9db3..70924b5c2 100644 --- a/src/Jackett.Common/Definitions/kickasstorrents-ws.yml +++ b/src/Jackett.Common/Definitions/kickasstorrents-ws.yml @@ -76,15 +76,16 @@ search: selector: table.data tr[id] fields: - category: + category_optional: selector: span[id^="cat_"] > strong > a attribute: href optional: true - default: other filters: - name: tolower - name: trim args: / + category: + text: "{{ if .Result.category_optional }}{{ .Result.category_optional }}{{ else }}other{{ end }}" title: selector: a[class="cellMainLink"] details: diff --git a/src/Jackett.Common/Definitions/kinorun.yml b/src/Jackett.Common/Definitions/kinorun.yml index 1ae2976dd..b1ca230a2 100644 --- a/src/Jackett.Common/Definitions/kinorun.yml +++ b/src/Jackett.Common/Definitions/kinorun.yml @@ -113,14 +113,15 @@ search: selector: table.embedded > tbody > tr:has(a[href^="details.php?id="]) fields: - category: + category_optional: selector: a[href^="browse.php?cat="] attribute: href optional: true - default: 24 filters: - name: querystring args: cat + category: + text: "{{ if .Result.category_optional }}{{ .Result.category_optional }}{{ else }}24{{ end }}" title: selector: a[href^="./torrent-"] details: diff --git a/src/Jackett.Common/Definitions/krazyzone.yml b/src/Jackett.Common/Definitions/krazyzone.yml index 680bb0acf..ad6c9b82e 100644 --- a/src/Jackett.Common/Definitions/krazyzone.yml +++ b/src/Jackett.Common/Definitions/krazyzone.yml @@ -132,14 +132,15 @@ search: - name: andmatch fields: - category: + category_optional: selector: a[href^="torrents.php?cat="] attribute: href optional: true - default: 95 filters: - name: querystring args: cat + category: + text: "{{ if .Result.category_optional }}{{ .Result.category_optional }}{{ else }}95{{ end }}" title: selector: a[href^="torrents-details.php?id="] attribute: title diff --git a/src/Jackett.Common/Definitions/newretro.yml b/src/Jackett.Common/Definitions/newretro.yml index 8a6d3a3d3..91ac24ce9 100644 --- a/src/Jackett.Common/Definitions/newretro.yml +++ b/src/Jackett.Common/Definitions/newretro.yml @@ -130,7 +130,7 @@ search: - name: andmatch fields: - category_id: + category_optional: selector: a[href^="browse.php?cat="] attribute: href optional: true @@ -138,7 +138,7 @@ search: - name: querystring args: cat category: - text: "{{ if .Result.category_id }}{{ .Result.category_id }}{{ else }}129{{ end }}" + text: "{{ if .Result.category_optional }}{{ .Result.category_optional }}{{ else }}129{{ end }}" title: selector: a[href^="details.php?id="]:has(b) details: diff --git a/src/Jackett.Common/Definitions/proporno.yml b/src/Jackett.Common/Definitions/proporno.yml index 960e7f5ac..33169ffe1 100644 --- a/src/Jackett.Common/Definitions/proporno.yml +++ b/src/Jackett.Common/Definitions/proporno.yml @@ -55,11 +55,11 @@ search: after: 1 fields: - categorydesc_id: + categorydesc_optional: selector: div.inmy > a:last-of-type optional: true categorydesc: - text: "{{ if .Result.categorydesc_id }}{{ .Result.categorydesc_id }}{{ else }}порно видео{{ end }}" + text: "{{ if .Result.categorydesc_optional }}{{ .Result.categorydesc_optional }}{{ else }}порно видео{{ end }}" title: selector: div.news_text > a details: diff --git a/src/Jackett.Common/Definitions/riperam.yml b/src/Jackett.Common/Definitions/riperam.yml index f0d5b1581..488586a17 100644 --- a/src/Jackett.Common/Definitions/riperam.yml +++ b/src/Jackett.Common/Definitions/riperam.yml @@ -877,10 +877,11 @@ search: selector: li.row:has(a[href^="./download/file.php?id="]) fields: - categorydesc: + categorydesc_optional: selector: dt a:last-of-type optional: true - default: Разное + categorydesc: + text: "{{ if .Result.categorydesc_optional }}{{ .Result.categorydesc_optional }}{{ else }}Разное{{ end }}" title: selector: a.topictitle filters: diff --git a/src/Jackett.Common/Definitions/torrent9.yml b/src/Jackett.Common/Definitions/torrent9.yml index ea5979861..44adc9820 100644 --- a/src/Jackett.Common/Definitions/torrent9.yml +++ b/src/Jackett.Common/Definitions/torrent9.yml @@ -114,10 +114,9 @@ search: - name: andmatch fields: - category: + category_optional: selector: td:nth-child(1) i optional: true - default: other case: i[class="fa fa-video-camera"]: films i[class="fa fa-tv"]: series # search by name @@ -126,6 +125,8 @@ search: i[class="fa fa-gamepad"]: jeux-pc i[class="fa fa-laptop"]: logiciels i[class="fa fa-book"]: ebook + category: + text: "{{ if .Result.category_optional }}{{ .Result.category_optional }}{{ else }}other{{ end }}" title_default: selector: td:nth-child(1) a title_optional: diff --git a/src/Jackett.Common/Definitions/torrentcore.yml b/src/Jackett.Common/Definitions/torrentcore.yml index 277722c4f..5094373de 100644 --- a/src/Jackett.Common/Definitions/torrentcore.yml +++ b/src/Jackett.Common/Definitions/torrentcore.yml @@ -65,14 +65,15 @@ search: after: 3 fields: - category: + category_optional: selector: img[src^="./cat/"] attribute: src optional: true - default: UNKNOWN filters: - name: regexp args: "cat/(.+?).png" + category: + text: "{{ if .Result.category_optional }}{{ .Result.category_optional }}{{ else }}UNKNOWN{{ end }}" title: selector: a details: diff --git a/src/Jackett.Common/Definitions/torrentland.yml b/src/Jackett.Common/Definitions/torrentland.yml index eae8e1c59..66c342858 100644 --- a/src/Jackett.Common/Definitions/torrentland.yml +++ b/src/Jackett.Common/Definitions/torrentland.yml @@ -107,10 +107,11 @@ search: selector: table > tbody > tr:has(a[href*="/download/"]) fields: - categorydesc: + categorydesc_optional: selector: span[data-original-title="Categoria"] optional: true - default: Otros + categorydesc: + text: "{{ if .Result.categorydesc_optional }}{{ .Result.categorydesc_optional }}{{ else }}Otros{{ end }}" title_vose: selector: a.view-torrent:contains("VOSE") optional: true diff --git a/src/Jackett.Common/Definitions/xwtclassics.yml b/src/Jackett.Common/Definitions/xwtclassics.yml index fc01b0bf7..9edad27e3 100644 --- a/src/Jackett.Common/Definitions/xwtclassics.yml +++ b/src/Jackett.Common/Definitions/xwtclassics.yml @@ -92,14 +92,15 @@ search: selector: table[border="0"][cellspacing="0"][cellpadding="5"] tr:has(a[href^="download.php?id="]) fields: - category: + category_optional: selector: a[href^="browse.php?cat="] attribute: href optional: true - default: 8 filters: - name: querystring args: cat + category: + text: "{{ if .Result.category_optional }}{{ .Result.category_optional }}{{ else }}8{{ end }}" title: selector: a[href^="details.php?id="] attribute: title