torrent9: cat can be missing & update keywordless search path

Search for 2022 currently returns blank page - https://torrent9.to/search_torrent/2022.html

If this is resolved in future, revert this commit apart from the missing cat fix.
This commit is contained in:
ilike2burnthing 2022-06-18 03:37:26 +01:00 committed by GitHub
parent 54f29890ef
commit 88a98580ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 6 deletions

View File

@ -54,6 +54,7 @@ caps:
- {id: logiciels, cat: PC, desc: "Software"} - {id: logiciels, cat: PC, desc: "Software"}
- {id: jeux-pc, cat: PC/Games, desc: "PC Games"} - {id: jeux-pc, cat: PC/Games, desc: "PC Games"}
- {id: jeux-consoles, cat: Console/XBox 360, desc: "Console Games"} - {id: jeux-consoles, cat: Console/XBox 360, desc: "Console Games"}
- {id: other, cat: Other, desc: "Other"} # dummy cat for results missing icon
modes: modes:
search: [q] search: [q]
@ -104,7 +105,7 @@ download:
search: search:
paths: paths:
- path: "/search_torrent/{{ if .Keywords }}{{ .Keywords }}{{ else }}{{ .Today.Year }}{{ end }}{{ .Config.sort }}" - path: "{{ if .Keywords }}/search_torrent/{{ .Keywords }}{{ .Config.sort }}{{ else }}{{ end }}"
keywordsfilters: keywordsfilters:
# if searching for season packs with S01 to saison 1 #9712 # if searching for season packs with S01 to saison 1 #9712
- name: re_replace - name: re_replace
@ -125,6 +126,9 @@ search:
fields: fields:
category: category:
text: other
category|noappend:
optional: true
selector: td:nth-child(1) i selector: td:nth-child(1) i
case: case:
i[class="fa fa-video-camera"]: films i[class="fa fa-video-camera"]: films
@ -179,13 +183,16 @@ search:
download: download:
selector: td:nth-child(1) a selector: td:nth-child(1) a
attribute: href attribute: href
date: date_optional:
selector: td:nth-child(2) optional: true
selector: td:nth-child(2):contains("/")
filters: filters:
- name: dateparse - name: dateparse
args: "02/01/2006" args: "02/01/2006"
date:
text: "{{ if .Result.date_optional }}{{ .Result.date_optional }}{{ else }}now{{ end }}"
size: size:
selector: td:nth-child(3) selector: "{{ if .Keywords }}td:nth-child(3){{ else }}td:nth-child(2){{ end }}"
filters: filters:
- name: replace - name: replace
args: ["Ko", "KB"] args: ["Ko", "KB"]
@ -196,12 +203,12 @@ search:
- name: replace - name: replace
args: ["To", "TB"] args: ["To", "TB"]
seeders_optional: seeders_optional:
selector: td:nth-child(4) selector: "{{ if .Keywords }}td:nth-child(4){{ else }}td:nth-child(3){{ end }}"
optional: true optional: true
seeders: seeders:
text: "{{ if .Result.seeders_optional }}{{ .Result.seeders_optional }}{{ else }}0{{ end }}" text: "{{ if .Result.seeders_optional }}{{ .Result.seeders_optional }}{{ else }}0{{ end }}"
leechers_optional: leechers_optional:
selector: td:nth-child(5) selector: "{{ if .Keywords }}td:nth-child(5){{ else }}td:nth-child(4){{ end }}"
optional: true optional: true
leechers: leechers:
text: "{{ if .Result.leechers_optional }}{{ .Result.leechers_optional }}{{ else }}0{{ end }}" text: "{{ if .Result.leechers_optional }}{{ .Result.leechers_optional }}{{ else }}0{{ end }}"