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
|
selector: article
|
||||||
|
|
||||||
fields:
|
fields:
|
||||||
category:
|
category_optional:
|
||||||
|
optional: true
|
||||||
selector: a[href*="category="]
|
selector: a[href*="category="]
|
||||||
attribute: href
|
attribute: href
|
||||||
optional: true
|
|
||||||
default: 54
|
|
||||||
case:
|
case:
|
||||||
a[href$="3d_hentai"]: 51
|
a[href$="3d_hentai"]: 51
|
||||||
a[href$="3dcg_game"]: 55
|
a[href$="3dcg_game"]: 55
|
||||||
@@ -111,6 +110,8 @@ search:
|
|||||||
a[href$="original_hentai"]: 48
|
a[href$="original_hentai"]: 48
|
||||||
a[href$="rus-game"]: 57
|
a[href$="rus-game"]: 57
|
||||||
a[href$="uncensored"]: 45
|
a[href$="uncensored"]: 45
|
||||||
|
category:
|
||||||
|
text: "{{ if .Result.category_optional }}{{ .Result.category_optional }}{{ else }}54{{ end }}"
|
||||||
title:
|
title:
|
||||||
selector: h2.title a
|
selector: h2.title a
|
||||||
details:
|
details:
|
||||||
|
@@ -91,11 +91,10 @@ search:
|
|||||||
selector: table.torrenttable_helper > tbody > tr:has(img)
|
selector: table.torrenttable_helper > tbody > tr:has(img)
|
||||||
|
|
||||||
fields:
|
fields:
|
||||||
category:
|
category_optional:
|
||||||
selector: img[class^="cat-"]
|
selector: img[class^="cat-"]
|
||||||
attribute: class
|
attribute: class
|
||||||
optional: true
|
optional: true
|
||||||
default: 12
|
|
||||||
case:
|
case:
|
||||||
img.cat-anime: 1
|
img.cat-anime: 1
|
||||||
img.cat-hk: 2
|
img.cat-hk: 2
|
||||||
@@ -113,6 +112,8 @@ search:
|
|||||||
img.cat-pinku: 12
|
img.cat-pinku: 12
|
||||||
img.cat-drama: 15
|
img.cat-drama: 15
|
||||||
img.cat-ost: 16
|
img.cat-ost: 16
|
||||||
|
category:
|
||||||
|
text: "{{ if .Result.category_optional }}{{ .Result.category_optional }}{{ else }}12{{ end }}"
|
||||||
title:
|
title:
|
||||||
selector: span[id]
|
selector: span[id]
|
||||||
details:
|
details:
|
||||||
|
@@ -123,14 +123,15 @@ search:
|
|||||||
- name: andmatch
|
- name: andmatch
|
||||||
|
|
||||||
fields:
|
fields:
|
||||||
category:
|
category_optional:
|
||||||
selector: a[href^="browse.php?cat="]
|
selector: a[href^="browse.php?cat="]
|
||||||
attribute: href
|
attribute: href
|
||||||
optional: true
|
optional: true
|
||||||
default: 38
|
|
||||||
filters:
|
filters:
|
||||||
- name: querystring
|
- name: querystring
|
||||||
args: cat
|
args: cat
|
||||||
|
category:
|
||||||
|
text: "{{ if .Result.category_optional }}{{ .Result.category_optional }}{{ else }}38{{ end }}"
|
||||||
title_default:
|
title_default:
|
||||||
# can be abbreviated
|
# can be abbreviated
|
||||||
selector: a[href^="details.php?id="]
|
selector: a[href^="details.php?id="]
|
||||||
|
@@ -65,14 +65,15 @@ search:
|
|||||||
- name: andmatch
|
- name: andmatch
|
||||||
|
|
||||||
fields:
|
fields:
|
||||||
category:
|
category_optional:
|
||||||
selector: article.post-entry
|
selector: article.post-entry
|
||||||
attribute: class
|
attribute: class
|
||||||
optional: true
|
optional: true
|
||||||
default: other
|
|
||||||
filters:
|
filters:
|
||||||
- name: regexp
|
- name: regexp
|
||||||
args: "category-(.+?) "
|
args: "category-(.+?) "
|
||||||
|
category:
|
||||||
|
text: "{{ if .Result.category_optional }}{{ .Result.category_optional }}{{ else }}other{{ end }}"
|
||||||
title:
|
title:
|
||||||
selector: h2 > a
|
selector: h2 > a
|
||||||
details:
|
details:
|
||||||
|
@@ -122,11 +122,12 @@ search:
|
|||||||
selector: table.table-striped > tbody > tr
|
selector: table.table-striped > tbody > tr
|
||||||
|
|
||||||
fields:
|
fields:
|
||||||
category:
|
category_optional:
|
||||||
selector: td:nth-child(1) div div a:last-child
|
selector: td:nth-child(1) div div a:last-child
|
||||||
attribute: href
|
attribute: href
|
||||||
optional: true
|
optional: true
|
||||||
default: "/other/"
|
category:
|
||||||
|
text: "{{ if .Result.category_optional }}{{ .Result.category_optional }}{{ else }}/other/{{ end }}"
|
||||||
title:
|
title:
|
||||||
selector: td:nth-child(1) div a
|
selector: td:nth-child(1) div a
|
||||||
details:
|
details:
|
||||||
|
@@ -104,14 +104,15 @@ search:
|
|||||||
after: 1
|
after: 1
|
||||||
|
|
||||||
fields:
|
fields:
|
||||||
category:
|
category_optional:
|
||||||
selector: a[href^="/search.php?cat="]
|
selector: a[href^="/search.php?cat="]
|
||||||
attribute: href
|
attribute: href
|
||||||
optional: true
|
optional: true
|
||||||
default: 33
|
|
||||||
filters:
|
filters:
|
||||||
- name: querystring
|
- name: querystring
|
||||||
args: cat
|
args: cat
|
||||||
|
category:
|
||||||
|
text: "{{ if .Result.category_optional }}{{ .Result.category_optional }}{{ else }}33{{ end }}"
|
||||||
title:
|
title:
|
||||||
selector: td:nth-child(2) a[title]
|
selector: td:nth-child(2) a[title]
|
||||||
attribute: title
|
attribute: title
|
||||||
|
@@ -149,14 +149,15 @@ search:
|
|||||||
selector: table.ttable_headinner tr.t-row
|
selector: table.ttable_headinner tr.t-row
|
||||||
|
|
||||||
fields:
|
fields:
|
||||||
category:
|
category_optional:
|
||||||
selector: a[href*="cat="]
|
selector: a[href*="cat="]
|
||||||
attribute: href
|
attribute: href
|
||||||
optional: true
|
optional: true
|
||||||
default: 56
|
|
||||||
filters:
|
filters:
|
||||||
- name: querystring
|
- name: querystring
|
||||||
args: cat
|
args: cat
|
||||||
|
category:
|
||||||
|
text: "{{ if .Result.category_optional }}{{ .Result.category_optional }}{{ else }}56{{ end }}"
|
||||||
title:
|
title:
|
||||||
selector: a[href^="torrents-details.php?id="]
|
selector: a[href^="torrents-details.php?id="]
|
||||||
attribute: title
|
attribute: title
|
||||||
|
@@ -76,15 +76,16 @@ search:
|
|||||||
selector: table.data tr[id]
|
selector: table.data tr[id]
|
||||||
|
|
||||||
fields:
|
fields:
|
||||||
category:
|
category_optional:
|
||||||
selector: span[id^="cat_"] > strong > a
|
selector: span[id^="cat_"] > strong > a
|
||||||
attribute: href
|
attribute: href
|
||||||
optional: true
|
optional: true
|
||||||
default: other
|
|
||||||
filters:
|
filters:
|
||||||
- name: tolower
|
- name: tolower
|
||||||
- name: trim
|
- name: trim
|
||||||
args: /
|
args: /
|
||||||
|
category:
|
||||||
|
text: "{{ if .Result.category_optional }}{{ .Result.category_optional }}{{ else }}other{{ end }}"
|
||||||
title:
|
title:
|
||||||
selector: a[class="cellMainLink"]
|
selector: a[class="cellMainLink"]
|
||||||
details:
|
details:
|
||||||
|
@@ -113,14 +113,15 @@ search:
|
|||||||
selector: table.embedded > tbody > tr:has(a[href^="details.php?id="])
|
selector: table.embedded > tbody > tr:has(a[href^="details.php?id="])
|
||||||
|
|
||||||
fields:
|
fields:
|
||||||
category:
|
category_optional:
|
||||||
selector: a[href^="browse.php?cat="]
|
selector: a[href^="browse.php?cat="]
|
||||||
attribute: href
|
attribute: href
|
||||||
optional: true
|
optional: true
|
||||||
default: 24
|
|
||||||
filters:
|
filters:
|
||||||
- name: querystring
|
- name: querystring
|
||||||
args: cat
|
args: cat
|
||||||
|
category:
|
||||||
|
text: "{{ if .Result.category_optional }}{{ .Result.category_optional }}{{ else }}24{{ end }}"
|
||||||
title:
|
title:
|
||||||
selector: a[href^="./torrent-"]
|
selector: a[href^="./torrent-"]
|
||||||
details:
|
details:
|
||||||
|
@@ -132,14 +132,15 @@ search:
|
|||||||
- name: andmatch
|
- name: andmatch
|
||||||
|
|
||||||
fields:
|
fields:
|
||||||
category:
|
category_optional:
|
||||||
selector: a[href^="torrents.php?cat="]
|
selector: a[href^="torrents.php?cat="]
|
||||||
attribute: href
|
attribute: href
|
||||||
optional: true
|
optional: true
|
||||||
default: 95
|
|
||||||
filters:
|
filters:
|
||||||
- name: querystring
|
- name: querystring
|
||||||
args: cat
|
args: cat
|
||||||
|
category:
|
||||||
|
text: "{{ if .Result.category_optional }}{{ .Result.category_optional }}{{ else }}95{{ end }}"
|
||||||
title:
|
title:
|
||||||
selector: a[href^="torrents-details.php?id="]
|
selector: a[href^="torrents-details.php?id="]
|
||||||
attribute: title
|
attribute: title
|
||||||
|
@@ -130,7 +130,7 @@ search:
|
|||||||
- name: andmatch
|
- name: andmatch
|
||||||
|
|
||||||
fields:
|
fields:
|
||||||
category_id:
|
category_optional:
|
||||||
selector: a[href^="browse.php?cat="]
|
selector: a[href^="browse.php?cat="]
|
||||||
attribute: href
|
attribute: href
|
||||||
optional: true
|
optional: true
|
||||||
@@ -138,7 +138,7 @@ search:
|
|||||||
- name: querystring
|
- name: querystring
|
||||||
args: cat
|
args: cat
|
||||||
category:
|
category:
|
||||||
text: "{{ if .Result.category_id }}{{ .Result.category_id }}{{ else }}129{{ end }}"
|
text: "{{ if .Result.category_optional }}{{ .Result.category_optional }}{{ else }}129{{ end }}"
|
||||||
title:
|
title:
|
||||||
selector: a[href^="details.php?id="]:has(b)
|
selector: a[href^="details.php?id="]:has(b)
|
||||||
details:
|
details:
|
||||||
|
@@ -55,11 +55,11 @@ search:
|
|||||||
after: 1
|
after: 1
|
||||||
|
|
||||||
fields:
|
fields:
|
||||||
categorydesc_id:
|
categorydesc_optional:
|
||||||
selector: div.inmy > a:last-of-type
|
selector: div.inmy > a:last-of-type
|
||||||
optional: true
|
optional: true
|
||||||
categorydesc:
|
categorydesc:
|
||||||
text: "{{ if .Result.categorydesc_id }}{{ .Result.categorydesc_id }}{{ else }}порно видео{{ end }}"
|
text: "{{ if .Result.categorydesc_optional }}{{ .Result.categorydesc_optional }}{{ else }}порно видео{{ end }}"
|
||||||
title:
|
title:
|
||||||
selector: div.news_text > a
|
selector: div.news_text > a
|
||||||
details:
|
details:
|
||||||
|
@@ -877,10 +877,11 @@ search:
|
|||||||
selector: li.row:has(a[href^="./download/file.php?id="])
|
selector: li.row:has(a[href^="./download/file.php?id="])
|
||||||
|
|
||||||
fields:
|
fields:
|
||||||
categorydesc:
|
categorydesc_optional:
|
||||||
selector: dt a:last-of-type
|
selector: dt a:last-of-type
|
||||||
optional: true
|
optional: true
|
||||||
default: Разное
|
categorydesc:
|
||||||
|
text: "{{ if .Result.categorydesc_optional }}{{ .Result.categorydesc_optional }}{{ else }}Разное{{ end }}"
|
||||||
title:
|
title:
|
||||||
selector: a.topictitle
|
selector: a.topictitle
|
||||||
filters:
|
filters:
|
||||||
|
@@ -114,10 +114,9 @@ search:
|
|||||||
- name: andmatch
|
- name: andmatch
|
||||||
|
|
||||||
fields:
|
fields:
|
||||||
category:
|
category_optional:
|
||||||
selector: td:nth-child(1) i
|
selector: td:nth-child(1) i
|
||||||
optional: true
|
optional: true
|
||||||
default: other
|
|
||||||
case:
|
case:
|
||||||
i[class="fa fa-video-camera"]: films
|
i[class="fa fa-video-camera"]: films
|
||||||
i[class="fa fa-tv"]: series # search by name
|
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-gamepad"]: jeux-pc
|
||||||
i[class="fa fa-laptop"]: logiciels
|
i[class="fa fa-laptop"]: logiciels
|
||||||
i[class="fa fa-book"]: ebook
|
i[class="fa fa-book"]: ebook
|
||||||
|
category:
|
||||||
|
text: "{{ if .Result.category_optional }}{{ .Result.category_optional }}{{ else }}other{{ end }}"
|
||||||
title_default:
|
title_default:
|
||||||
selector: td:nth-child(1) a
|
selector: td:nth-child(1) a
|
||||||
title_optional:
|
title_optional:
|
||||||
|
@@ -65,14 +65,15 @@ search:
|
|||||||
after: 3
|
after: 3
|
||||||
|
|
||||||
fields:
|
fields:
|
||||||
category:
|
category_optional:
|
||||||
selector: img[src^="./cat/"]
|
selector: img[src^="./cat/"]
|
||||||
attribute: src
|
attribute: src
|
||||||
optional: true
|
optional: true
|
||||||
default: UNKNOWN
|
|
||||||
filters:
|
filters:
|
||||||
- name: regexp
|
- name: regexp
|
||||||
args: "cat/(.+?).png"
|
args: "cat/(.+?).png"
|
||||||
|
category:
|
||||||
|
text: "{{ if .Result.category_optional }}{{ .Result.category_optional }}{{ else }}UNKNOWN{{ end }}"
|
||||||
title:
|
title:
|
||||||
selector: a
|
selector: a
|
||||||
details:
|
details:
|
||||||
|
@@ -107,10 +107,11 @@ search:
|
|||||||
selector: table > tbody > tr:has(a[href*="/download/"])
|
selector: table > tbody > tr:has(a[href*="/download/"])
|
||||||
|
|
||||||
fields:
|
fields:
|
||||||
categorydesc:
|
categorydesc_optional:
|
||||||
selector: span[data-original-title="Categoria"]
|
selector: span[data-original-title="Categoria"]
|
||||||
optional: true
|
optional: true
|
||||||
default: Otros
|
categorydesc:
|
||||||
|
text: "{{ if .Result.categorydesc_optional }}{{ .Result.categorydesc_optional }}{{ else }}Otros{{ end }}"
|
||||||
title_vose:
|
title_vose:
|
||||||
selector: a.view-torrent:contains("VOSE")
|
selector: a.view-torrent:contains("VOSE")
|
||||||
optional: true
|
optional: true
|
||||||
|
@@ -92,14 +92,15 @@ search:
|
|||||||
selector: table[border="0"][cellspacing="0"][cellpadding="5"] tr:has(a[href^="download.php?id="])
|
selector: table[border="0"][cellspacing="0"][cellpadding="5"] tr:has(a[href^="download.php?id="])
|
||||||
|
|
||||||
fields:
|
fields:
|
||||||
category:
|
category_optional:
|
||||||
selector: a[href^="browse.php?cat="]
|
selector: a[href^="browse.php?cat="]
|
||||||
attribute: href
|
attribute: href
|
||||||
optional: true
|
optional: true
|
||||||
default: 8
|
|
||||||
filters:
|
filters:
|
||||||
- name: querystring
|
- name: querystring
|
||||||
args: cat
|
args: cat
|
||||||
|
category:
|
||||||
|
text: "{{ if .Result.category_optional }}{{ .Result.category_optional }}{{ else }}8{{ end }}"
|
||||||
title:
|
title:
|
||||||
selector: a[href^="details.php?id="]
|
selector: a[href^="details.php?id="]
|
||||||
attribute: title
|
attribute: title
|
||||||
|
Reference in New Issue
Block a user