mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
assorted: fix missing cat href handling
we want to handle the href when it is missing, but we also want to spot when a site adds new cats that we have not mapped yet.
This commit is contained in:
@@ -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:
|
||||
|
@@ -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:
|
||||
|
@@ -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="]
|
||||
|
@@ -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:
|
||||
|
@@ -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:
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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:
|
||||
|
@@ -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:
|
||||
|
@@ -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
|
||||
|
@@ -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:
|
||||
|
@@ -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:
|
||||
|
@@ -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:
|
||||
|
@@ -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:
|
||||
|
@@ -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:
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user