assorted yml: code tidy

This commit is contained in:
Garfield69
2020-11-15 08:50:26 +13:00
parent e74b64d411
commit 0d404ce7fc
8 changed files with 55 additions and 47 deletions

View File

@@ -106,7 +106,7 @@ search:
inputs:
page: torrents
search: "{{ if .Query.IMDBID }}{{ .Query.IMDBID }}{{ else }}{{ .Keywords }}{{ end }}"
category: "{{ if .Categories }}{{ range .Categories }}{{.}};{{end}}{{else}}0{{end}}"
category: "{{ if .Categories }}{{ range .Categories }}{{.}};{{end}}{{ else }}0{{ end }}"
# 0 title 1 title&descr 2 descr
options: "{{ if .Query.IMDBID }}1{{ else }}0{{ end }}"
# 0 all, 1 activeonly, 2 deadonly

View File

@@ -43,17 +43,17 @@ caps:
search:
paths:
- path: "{{ if .Keywords }}buscar/descargas/{{ .Config.category }}/{{ .Keywords }}?search=Buscar{{else}}descargas{{end}}"
- path: "{{ if .Keywords }}buscar/descargas/{{ .Config.category }}/{{ .Keywords }}?search=Buscar&page=2{{else}}descargas{{end}}"
- path: "{{ if .Keywords }}buscar/descargas/{{ .Config.category }}/{{ .Keywords }}?search=Buscar{{ else }}descargas{{ end }}"
- path: "{{ if .Keywords }}buscar/descargas/{{ .Config.category }}/{{ .Keywords }}?search=Buscar&page=2{{ else }}descargas{{ end }}"
keywordsfilters:
- name: re_replace # remove first season from search string
args: ["(S1)", ""]
args: ["(?i)(S1)", ""]
- name: re_replace # switch second season from search string
args: ["(S2)", "segunda temporada"]
args: ["(?i)(S2)", "segunda temporada"]
- name: re_replace # switch third season from search string
args: ["(S3)", "tercera temporada"]
args: ["(?i)(S3)", "tercera temporada"]
- name: re_replace # remove E from episode number from search string
args: ["E([0-9]+)", "$1"]
args: ["(?i)E([0-9]+)", "$1"]
rows:
selector: table#descargas > tbody > tr:has(td:has(a[href^="magnet:?"]))

View File

@@ -33,54 +33,57 @@ search:
paths:
- path: browse.php
inputs:
search: "{{if .Query.Artist}}{{ .Query.Artist }}{{else}}{{ .Keywords }}{{end}}"
showsearch: "1"
incldead: "1"
search: "{{ if .Query.Artist }}{{ .Query.Artist }}{{ else }}{{ .Keywords }}{{ end }}"
showsearch: 1
incldead: 1
rows:
selector: table.tablak > tbody > tr:has(a[href^="details.php?id="])
fields:
download:
selector: a[href^="download.php?id="]
attribute: href
category:
text: 1
title:
selector: a[href^="details.php?id="][title]
attribute: title
filters:
- name: regexp
args: ^(.*?)<br />
details:
selector: a[href^="details.php?id="][title]
attribute: href
download:
selector: a[href^="download.php?id="]
attribute: href
poster:
selector: a[href^="details.php?id="][title]
attribute: title
filters:
- name: regexp
args: "src=\"(.*?)\">"
category:
text: "1"
details:
selector: a[href^="details.php?id="][title]
attribute: href
description:
selector: td:nth-child(2) > i > font
size:
selector: td:nth-child(7)
grabs:
selector: td:nth-child(10)
seeders:
selector: td:nth-child(8)
leechers:
selector: td:nth-child(9)
date:
selector: td:nth-child(6)
filters:
- name: append
args: " +01:00"
args: " +01:00" # CET
- name: dateparse
args: "2006-01-02 15:04:05 -07:00"
size:
selector: td:nth-child(7)
seeders:
selector: td:nth-child(8)
leechers:
selector: td:nth-child(9)
grabs:
selector: td:nth-child(10)
downloadvolumefactor:
text: "0"
text: 0
uploadvolumefactor:
case:
font[title^="Dupla feltöltésű torrent!"]: "2"
font[title^="x3 feltöltésű torrent!"]: "3"
font[title^="x4 feltöltésű torrent!"]: "4"
"*": "1"
font[title^="Dupla feltöltésű torrent!"]: 2
font[title^="x3 feltöltésű torrent!"]: 3
font[title^="x4 feltöltésű torrent!"]: 4
"*": 1
# engine tbd

View File

@@ -73,10 +73,12 @@ search:
- path: browse.php
inputs:
# $raw: "{{range .Categories}}c{{.}}=1&{{end}}"
search: "{{if .Query.Artist}}{{ .Query.Artist }}{{else}}{{ .Keywords }}{{end}}"
search: "{{ if .Query.Artist }}{{ .Query.Artist }}{{ else }}{{ .Keywords }}{{ end }}"
incldead: 1
rows:
selector: table.mainouter > tbody > tr > td.outer > table > tbody > tr.mouse_out
fields:
description:
optional: true
@@ -84,6 +86,9 @@ search:
title:
selector: td:nth-child(2)
remove: font
details:
selector: a[href^="details.php?id="]
attribute: href
category:
selector: a[href^="browse.php?cat="]
attribute: href
@@ -95,20 +100,11 @@ search:
case:
a[href="/browse.php?ext=1&bitrate=Lossless"]: 3040
a[href="/browse.php?ext=1&format=MP3"]: 3010
details:
selector: a[href^="details.php?id="]
attribute: href
download:
selector: a[href^="download.php"]
attribute: href
files:
selector: td:nth-child(5)
size:
selector: td:nth-child(8)
seeders:
selector: td:nth-child(10)
leechers:
selector: td:nth-child(11)
date:
selector: td:nth-child(7)
filters:
@@ -116,11 +112,18 @@ search:
args: " +00:00" # GMT
- name: dateparse
args: "2006-01-0215:04:05 -07:00"
size:
selector: td:nth-child(8)
grabs:
selector: td:nth-child(9)
seeders:
selector: td:nth-child(10)
leechers:
selector: td:nth-child(11)
downloadvolumefactor:
case:
img[alt="Free Leech"]: 0
"*": 1
uploadvolumefactor:
text: 1
# engine tbd

View File

@@ -86,8 +86,10 @@ search:
keywordsfilters:
- name: re_replace
args: ["(\\w+)", " +$1"] # prepend + to each word
rows:
selector: ul.TorrentList
fields:
category:
selector: .TorrentList1 > a
@@ -121,7 +123,7 @@ search:
args: "02 Jan 06, 15:04 -07:00"
downloadvolumefactor:
case:
".TorrentList2 > a:contains(\"[FFL]\")": "0"
".TorrentList2 > a:contains(\"[FFL]\")": 0
"*": 1
uploadvolumefactor:
text: 1

View File

@@ -122,7 +122,7 @@ search:
selector: td:has(a[href$="filelist=1"]) ~ td ~ td > nobr
filters:
- name: append
args: " +02:00"
args: " +02:00" # EET
- name: dateparse
args: "2006-01-0215:04:05 -07:00"
size:

View File

@@ -102,7 +102,7 @@ search:
attribute: title
filters:
- name: append
args: " +08:00"
args: " +08:00" # CST
- name: dateparse
args: "2006-01-02 15:04:05 -07:00"
size:

View File

@@ -128,7 +128,7 @@ search:
optional: true
filters:
- name: append
args: " +08:00"
args: " +08:00" # CST
- name: dateparse
args: "2006-01-02 15:04:05 -07:00"
date:
@@ -137,7 +137,7 @@ search:
optional: true
filters:
- name: append
args: " +08:00"
args: " +08:00" # CST
- name: dateparse
args: "2006-01-0215:04:05 -07:00"
size: