torrent9: fix #2057

drop sort by seeds as site's page is broken
add category to results
add category filter in settings because site does not support multi-cats
add date now to prevent ugly' 2017y ago'
This commit is contained in:
Garfield69 2017-11-02 14:47:42 +13:00
parent 36bd2c032f
commit f02dad054b
1 changed files with 35 additions and 2 deletions

View File

@ -25,11 +25,33 @@
search: [q]
tv-search: [q, season, ep]
settings: []
settings:
- name: category
type: select
label: Category Filter
default: "/"
options:
"/" : "All"
"/films/": "Movies"
"/films-french/": "Movies/French"
"/films-vostfr/": "Movies/VOSTFR"
"/films-dvdrip-x264/": "Movies/DVDRIP .x264"
"/720p/": "Movies/BluRay 720p"
"/1080p/": "Movies/BluRay 1080p"
"/series/": "TV/Series"
"/series-vostfr/": "TV/VOSTFR"
"/series-francaise/": "TV/French"
"/series-dvdrip/": "TV/DVDRIP"
"/spectacles/": "Shows"
"/musique/": "Music"
"/ebook/": "Ebooks"
"/logiciels/": "Software"
"/jeux-pc/": "PC Games"
"/jeux-consoles/": "Console Games"
search:
paths:
- path: "{{if .Query.Keywords}}/search_torrent/{{range .Categories }}{{.}}/{{end}}{{ .Query.Keywords }}/page-0,trie-seeds-d{{else}}/top_torrent.php{{end}}"
- path: "{{ if .Keywords }}/search_torrent{{ .Config.category }}{{ .Keywords }}/page-0{{else}}/top_torrent.php{{end}}"
rows:
selector: div.table-responsive > table tbody tr
fields:
@ -55,6 +77,15 @@
details:
selector: td:nth-child(1) a
attribute: href
category:
selector: td:nth-child(1) i
case:
i[class="fa fa-video-camera"]: films
i[class="fa fa-desktop"]: series
i[class="fa fa-music"]: musique
i[class="fa fa-gamepad"]: jeux-pc
i[class="fa fa-laptop"]: logiciels
i[class="fa fa-book"]: ebook
download:
selector: td:nth-child(1) a
attribute: href
@ -63,6 +94,8 @@
args: [ "/torrent", "/get_torrent"]
- name: append
args: ".torrent"
date:
text: "now"
size:
selector: td:nth-child(2)
filters: