assorted yaml: code tidy

add date TZ where needed
add missing modes
This commit is contained in:
Garfield69 2020-11-06 18:27:16 +13:00
parent 570f422de1
commit 481d7d7dda
30 changed files with 129 additions and 103 deletions

View File

@ -230,8 +230,10 @@ search:
args: (\d{2}[\.|\/]\d{2}[\.|\/]\d{4})
- name: re_replace
args: ["\\/", "."]
- name: append
args: " +03:00" # MSK
- name: dateparse
args: "02.01.2006"
args: "02.01.2006 -07:00"
date:
text: "{{ if .Result.find_date }}{{ .Result.find_date}}{{ else }}now{{ end }}"
downloadvolumefactor:

View File

@ -19,7 +19,6 @@ caps:
- {id: 153, cat: Movies/DVD, desc: "Movies/Turkish/DVD5-DVD9"}
- {id: 154, cat: Movies/WEB-DL, desc: "Movies/Turkish/BRRip-HDRip-DVDRip-WebDL"}
- {id: 155, cat: Movies/Other, desc: "Movies/Turkish/Boxset"}
- {id: 156, cat: Movies, desc: "Movies/Foreign"}
- {id: 157, cat: Movies/UHD, desc: "Movies/Foreign/4K / 3D"}
- {id: 159, cat: Movies/HD, desc: "Movies/Foreign/1080p"}
@ -27,7 +26,6 @@ caps:
- {id: 161, cat: Movies/DVD, desc: "Movies/Foreign/DVD5-DVD9"}
- {id: 162, cat: Movies/WEB-DL, desc: "Movies/Foreign/BRRip-HDRip-DVDRip-WebDL"}
- {id: 163, cat: Movies/Other, desc: "Movies/Foreign/Boxset"}
- {id: 164, cat: TV, desc: "TV"}
- {id: 165, cat: TV, desc: "TV/Turkish"}
- {id: 166, cat: TV, desc: "TV/Foreign"}
@ -35,20 +33,17 @@ caps:
- {id: 185, cat: TV/Documentary, desc: "TV/Documentary"}
- {id: 168, cat: TV/Other, desc: "TV/Other"}
- {id: 169, cat: TV/Other, desc: "TV/Boxset"}
- {id: 191, cat: TV, desc: "TV/BluTv"}
- {id: 192, cat: TV, desc: "TV/BluTv Series"}
- {id: 193, cat: Movies, desc: "TV/BluTv Film"}
- {id: 199, cat: TV, desc: "TV/Netflix"}
- {id: 189, cat: TV, desc: "TV/Netflix Series"}
- {id: 190, cat: Movies, desc: "TV/Netflix Film"}
- {id: 171, cat: Audio, desc: "Music"}
- {id: 172, cat: Audio, desc: "Music/Turkish"}
- {id: 173, cat: Audio, desc: "Music/Foreign"}
- {id: 184, cat: Audio, desc: "Music/Discography"}
- {id: 174, cat: Audio/Video, desc: "Music/Video"}
- {id: 175, cat: PC, desc: "Apps / Game / Graphics"}
- {id: 176, cat: PC, desc: "Apps"}
- {id: 177, cat: Other, desc: "Pictures"}
@ -83,18 +78,18 @@ settings:
- name: sort
type: select
label: Sort requested from site
default: "added"
default: added
options:
"added": "created"
"seeders": "seeders"
"size": "size"
added: created
seeders: seeders
size: size
- name: type
type: select
label: Order requested from site
default: "desc"
default: desc
options:
"desc": "desc"
"asc": "asc"
desc: desc
asc: asc
- name: info_results
type: info
label: Search results
@ -145,14 +140,14 @@ search:
selector: "table#torrents_table_classic > tbody > tr:has(td.torrent_name){{ if .Config.freeleech }}:has(img[title=\"FREE!\"]){{ else }}{{ end }}"
fields:
title:
selector: a[href*="?p=torrents&pid=10&action=details"]
category:
selector: div.category_image > a
attribute: href
filters:
- name: querystring
args: cid
title:
selector: a[href*="?p=torrents&pid=10&action=details"]
details:
selector: a[href*="?p=torrents&pid=10&action=details"]
attribute: href
@ -166,8 +161,10 @@ search:
filters:
- name: regexp
args: "Uploaded (.+?) by"
- name: append
args: " +03:00" # TRT
- name: dateparse
args: "02-01-2006 15:04"
args: "02-01-2006 15:04 -07:00"
date:
optional: true
# Uploaded Friday at 05:11 by

View File

@ -157,7 +157,7 @@ search:
selector: td:nth-child(1) a
attribute: href
date:
text: "now"
text: now
size:
selector: td:nth-child(2)
seeders:

View File

@ -70,7 +70,7 @@ search:
inputs:
page: 5
inputs:
keyword: "{{ if .Keywords }}{{ .Keywords }}{{else}}-{{end}}"
keyword: "{{ if .Keywords }}{{ .Keywords }}{{ else }}-{{ end }}"
rows:
selector: section.sch_res_list > ul > li:has(span.sch_datetime:contains(":"))
@ -93,8 +93,10 @@ search:
date:
selector: span.sch_datetime
filters:
- name: append
args: " +09:00" # KST
- name: dateparse
args: "2006-01-02 15:04:05"
args: "2006-01-02 15:04:05 -07:00"
cat:
selector: a[href^="bbs/./board.php?"]
attribute: href
@ -102,7 +104,7 @@ search:
- name: querystring
args: bo_table
size:
text: "{{ if or eq .Result.cat \"torrent_movie\" (or eq .Result.cat \"torrent_movie_etc\" eq .Result.cat \"torrent_movie_eng\") }}2 GB{{else}}512 MB{{end}}"
text: "{{ if or eq .Result.cat \"torrent_movie\" (or eq .Result.cat \"torrent_movie_etc\" eq .Result.cat \"torrent_movie_eng\") }}2 GB{{ else }}512 MB{{ end }}"
seeders:
text: 1
leechers:

View File

@ -107,18 +107,18 @@ search:
selector: table.torrents > tbody > tr:has(table.torrentname)
fields:
title:
selector: a[href^="details.php?id="]
title:
optional: true
selector: a[title][href^="details.php?id="]
attribute: title
category:
selector: a[href^="?cat="]
attribute: href
filters:
- name: querystring
args: cat
title:
selector: a[href^="details.php?id="]
title:
optional: true
selector: a[title][href^="details.php?id="]
attribute: title
details:
selector: a[href^="details.php?id="]
attribute: href

View File

@ -107,7 +107,7 @@ login:
search:
paths:
- path: "{{ if .Keywords }}search{{ re_replace .Config.sort \"_\" \"\" }}?q={{ .Keywords }}{{else}}{{end}}"
- path: "{{ if .Keywords }}search{{ re_replace .Config.sort \"_\" \"\" }}?q={{ .Keywords }}{{ else }}{{ end }}"
rows:
selector: table.table2 > tbody > tr:has(span.smallish)
@ -135,6 +135,7 @@ search:
args: ["Last Month", "1 month ago"]
- name: replace
args: ["+", " ago"]
- name: timeago
size:
selector: td:nth-child(3)
seeders:

View File

@ -142,6 +142,9 @@ search:
details:
selector: td[valign="middle"] a
attribute: href
download:
selector: a[href^="download.php"]
attribute: href
banner:
optional: true
selector: td[valign="middle"] a
@ -163,11 +166,10 @@ search:
date:
selector: td:nth-child(4)
filters:
- name: append
args: " +01:00" # CET
- name: dateparse
args: "02/01/2006"
download:
selector: a[href^="download.php"]
attribute: href
args: "02/01/2006 -07:00"
downloadvolumefactor:
case:
img[src$="gold.gif"]: 0.05

View File

@ -58,14 +58,14 @@ search:
- name: andmatch
fields:
title:
selector: div a[href^="/torrent/"]
category:
selector: td[class^="tv"], td[class^="tn"]
attribute: class
filters:
- name: regexp
args: (\d+)
title:
selector: div a[href^="/torrent/"]
details:
selector: div a[href^="/torrent/"]
attribute: href
@ -93,8 +93,10 @@ search:
selector: td:nth-child(2):not(:contains("day"))
optional: true
filters:
- name: append
args: " -07:00" # PDT
- name: dateparse
args: "2 Jan"
args: "2 Jan -07:00"
size:
selector: td:nth-child(3)
seeders:

View File

@ -127,6 +127,12 @@ search:
selector: div[class="tgxtablerow"]
fields:
category:
selector: div a[href^="/torrents.php?cat="]
attribute: href
filters:
- name: querystring
args: cat
title_full:
selector: div a[href^="/torrent/"]
attribute: title
@ -144,12 +150,6 @@ search:
args: ["-", " "]
title:
text: "{{ if or .Result.title_full .Result.title_text }}{{ or .Result.title_full .Result.title_text }}{{ else }}{{ .Result.href }}{{ end }}"
category:
selector: div a[href^="/torrents.php?cat="]
attribute: href
filters:
- name: querystring
args: cat
details:
selector: div a[href^="/torrent/"]
attribute: href
@ -173,8 +173,10 @@ search:
optional: true
selector: div.tgxtablecell:last-of-type small:contains(":")
filters:
- name: append
args: " -07:00" # PDT
- name: dateparse
args: "02/01/06 15:04"
args: "02/01/06 15:04 -07:00"
downloadvolumefactor:
text: 0
uploadvolumefactor:

View File

@ -69,6 +69,12 @@ search:
selector: div.glavni_txt table > tbody > tr[id^="record-"]
fields:
category:
selector: td.kategorije > a[href^="browse.php?cat="]
attribute: href
filters:
- name: querystring
args: cat
title:
selector: a[href^="details.php?id="]
title:
@ -85,12 +91,6 @@ search:
details:
selector: a[href^="details.php?id="]
attribute: href
category:
selector: td.kategorije > a[href^="browse.php?cat="]
attribute: href
filters:
- name: querystring
args: cat
download:
selector: a[href^="download.php?id="]
attribute: href

View File

@ -77,20 +77,20 @@ search:
selector: table#torrentsTable > tbody > tr:has(td.torrentNameInfo)
fields:
download:
selector: a[href^="/download.php/"]
attribute: href
title:
selector: a[href^="/details.php?id="]
details:
selector: a[href^="/details.php?id="]
attribute: href
category:
selector: a[href^="?"]
attribute: href
filters:
- name: replace
args: ["?", ""]
title:
selector: a[href^="/details.php?id="]
details:
selector: a[href^="/details.php?id="]
attribute: href
download:
selector: a[href^="/download.php/"]
attribute: href
date:
selector: td.torrentNameInfo > div
filters:

View File

@ -29,7 +29,7 @@ settings:
search:
paths:
- path: "search/{{ if .Keywords }}{{ .Keywords}}{{else}}{{ .Today.Year }}{{end}}"
- path: "search/{{ if .Keywords }}{{ .Keywords}}{{ else }}{{ .Today.Year }}{{ end }}"
rows:
selector: table#archiveResult tbody tr:has(a[href^="magnet:?xt="])

View File

@ -75,7 +75,7 @@ search:
# 0 onlyactive, 1 all, 2 onlydead, 3 free
incldead: 1
# 0 title, 1 descr, 2 both
titlesearch: "{{ if .Query.IMDBID }}1{{else}}0{{end}}"
titlesearch: "{{ if .Query.IMDBID }}1{{ else }}0{{ end }}"
# 0 all, 1 polish, 2 not polish
polish: 0
cat_film: ""

View File

@ -83,7 +83,13 @@ search:
selector: span > a
attribute: href
date:
# 2020-11-05 07:34:44
selector: div > span:nth-child(4)
filters:
- name: append
args: " -07:00" # PDT
- name: dateparse
args: "2006-01-02 15:04:05 -07:00"
size:
selector: div > span:nth-child(5)
filters:

View File

@ -138,15 +138,18 @@ search:
selector: "table.tablebrowse > tbody > tr:has(a[href^=\"download_ssl.php\"]){{ if .Config.freeleech }}:has(font[color=\"#730d1e\"]:contains(\"[OnlyUpload]\")){{ else }}{{ end }}"
fields:
title:
selector: a[title][href^="details.php"]
attribute: title
category:
selector: a[href*="cat="]
attribute: href
filters:
- name: querystring
args: cat
title:
selector: a[title][href^="details.php"]
attribute: title
details:
selector: a[title][href^="details.php"]
attribute: href
comments:
selector: a[href*="&tocomm="]
attribute: href

View File

@ -573,7 +573,7 @@ search:
- path: tracker.php
method: post
inputs:
$raw: "{{ if .Categories }}{{ range .Categories }}f[]={{.}}&{{end}}{{else}}f[]=-1{{end}}"
$raw: "{{ if .Categories }}{{ range .Categories }}f[]={{.}}&{{end}}{{ else }}f[]=-1{{ end }}"
prev_allw: 1
prev_a: 0
prev_dla: 0

View File

@ -64,7 +64,7 @@ search:
gr_id: ""
# search in: title
sfl: wr_subject
stx: "{{ if .Keywords }}{{ .Keywords }}{{else}}금요일{{end}}"
stx: "{{ if .Keywords }}{{ .Keywords }}{{ else }}금요일{{ end }}"
# search operand: or, and
sop: and
@ -90,8 +90,10 @@ search:
selector: time
attribute: datetime
filters:
- name: replace
args: ["T", " "]
- name: dateparse
args: "2006-01-02T15:04:05+09:00"
args: "2006-01-02 15:04:05+09:00"
cat:
selector: div.media-heading > a[href^="./board.php"]
attribute: href
@ -99,7 +101,7 @@ search:
- name: querystring
args: bo_table
size:
text: "{{ if ne .Result.cat \"mov\" }}512 MB{{else}}2 GB{{end}}"
text: "{{ if ne .Result.cat \"mov\" }}512 MB{{ else }}2 GB{{ end }}"
seeders:
text: 1
leechers:

View File

@ -81,7 +81,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 }}2{{ else }}0{{ end }}"
# 0 all, 1 activeonly, 2 deadonly
@ -93,17 +93,17 @@ search:
selector: "table.lista tr td table.lista tr:has(a[href^=\"index.php?page=torrent-details\"]){{ if .Config.freeleech }}:has(img[src=\"gold/gold.gif\"]){{ else }}{{ end }}"
fields:
title:
selector: td a[href^="index.php?page=torrent-details"]
details:
selector: td a[href^="index.php?page=torrent-details"]
attribute: href
category:
selector: td a[href^="index.php?page=torrents&category="]
attribute: href
filters:
- name: querystring
args: category
title:
selector: td a[href^="index.php?page=torrent-details"]
details:
selector: td a[href^="index.php?page=torrent-details"]
attribute: href
download:
selector: td a[href^="download.php"]
attribute: href

View File

@ -68,8 +68,10 @@ search:
args: ["Ноя", "Nov"]
- name: replace
args: ["Дек", "Dec"]
- name: append
args: " +03:00" # MSK
- name: dateparse
args: "02 Jan 06"
args: "02 Jan 06 -07:00"
size:
selector: td:nth-of-type(3)
seeders:

View File

@ -100,7 +100,7 @@ search:
keywords: "{{ if .Query.IMDBID }}{{ .Query.IMDBID }}{{ else }}{{ .Keywords }}{{ end }}"
# t_name, t_description, t_both, t_uploader, t_genre
search_type: "{{ if .Query.IMDBID }}t_genre{{ else }}t_name{{ end }}"
category: "{{ if .Categories }}{{ range .Categories }}{{.}};{{end}}{{else}}0{{end}}"
category: "{{ if .Categories }}{{ range .Categories }}{{.}};{{end}}{{ else }}0{{ end }}"
include_dead_torrents: yes
sort: "{{ .Config.sort }}"
order: "{{ .Config.type }}"

View File

@ -83,7 +83,7 @@ search:
- path: torrents/filter
inputs:
$raw: "{{ range .Categories }}categories[]={{.}}&{{end}}"
search: "{{ if .Query.IMDBID }}{{else}}{{ .Keywords }}{{end}}"
search: "{{ if .Query.IMDBID }}{{ else }}{{ .Keywords }}{{ end }}"
description: ""
uploader: ""
imdb: "{{ .Query.IMDBIDShort }}"

View File

@ -648,7 +648,7 @@ search:
- name: re_replace # S01E01 to сезон 1 серии 1
args: ["(?i)\\bS0*(\\d+)E0*(\\d+)\\b", "сезон $1 серии $2"]
inputs:
$raw: "{{ if .Categories }}{{ range .Categories }}f[]={{.}}&{{end}}{{else}}f[]=-1{{end}}"
$raw: "{{ if .Categories }}{{ range .Categories }}f[]={{.}}&{{end}}{{ else }}f[]=-1{{ end }}"
prev_allw: 0
prev_a: 0
prev_dla: 0
@ -692,6 +692,12 @@ search:
selector: tr[id^="tor_"]:has(a[href^="magnet:?xt="])
fields:
category:
selector: a.gen
attribute: href
filters:
- name: querystring
args: f
title:
selector: a.genmed:nth-child(2), a.seedmed:nth-child(2)
filters:
@ -716,12 +722,6 @@ search:
magnet:
selector: a[href^="magnet:?xt="]
attribute: href
category:
selector: a.gen
attribute: href
filters:
- name: querystring
args: f
size:
selector: td:nth-child(7) > u
seeders:

View File

@ -673,7 +673,7 @@ search:
- name: re_replace # S01E01 to сезон 1 серии 1
args: ["(?i)\\bS0*(\\d+)E0*(\\d+)\\b", "сезон $1 серии $2"]
inputs:
$raw: "{{ if .Categories }}{{ range .Categories }}f[]={{.}}&{{end}}{{else}}f[]=-1{{end}}"
$raw: "{{ if .Categories }}{{ range .Categories }}f[]={{.}}&{{end}}{{ else }}f[]=-1{{ end }}"
prev_allw: 0
prev_a: 0
prev_dla: 0

View File

@ -539,7 +539,7 @@ search:
- name: re_replace # S01E01 to сезон 1 серии 1
args: ["(?i)\\bS0*(\\d+)E0*(\\d+)\\b", "сезон $1 серии $2"]
inputs:
$raw: "{{ if .Categories }}{{ range .Categories }}f[]={{.}}&{{end}}{{else}}f[]=-1{{end}}"
$raw: "{{ if .Categories }}{{ range .Categories }}f[]={{.}}&{{end}}{{ else }}f[]=-1{{ end }}"
prev_a: 0
prev_dla: 0
prev_dlc: 0

View File

@ -92,17 +92,17 @@ search:
selector: .tlist tr:not(:first-child)
fields:
title:
selector: td:nth-child(2) a
details:
selector: td:nth-child(2) a
attribute: href
category:
selector: td:nth-child(1) a
attribute: href
filters:
- name: querystring
args: cat
title:
selector: td:nth-child(2) a
details:
selector: td:nth-child(2) a
attribute: href
download:
selector: td:nth-child(2) a
attribute: href

View File

@ -93,8 +93,10 @@ search:
date:
selector: i
filters:
- name: append
args: " +03:00" # MSK
- name: dateparse
args: "2006-01-02 15:04:05"
args: "2006-01-02 15:04:05 -07:00"
files:
selector: td:nth-last-child(5)
size:

View File

@ -81,6 +81,12 @@ search:
selector: div.tbList table tbody tr:has(a[href^="download.php?torrent="])
fields:
category:
selector: a[href^="/list.php?cat="]
attribute: href
filters:
- name: querystring
args: cat
title:
selector: a[href^="item.php?id="]
details:
@ -96,23 +102,10 @@ search:
filters:
- name: regexp
args: src="(.+?)"
category:
selector: a[href^="/list.php?cat="]
attribute: href
filters:
- name: querystring
args: cat
imdb:
optional: true
selector: a[href*="imdb.com/title/tt"]
attribute: href
seeders:
selector: td:last-child
filters:
- name: regexp
args: "(\\d+) Peers"
leechers:
text: 0
size:
selector: td:last-child
filters:
@ -131,6 +124,13 @@ search:
args: " +01:00" # CET
- name: dateparse
args: "02.01.2006 15:04:05 -07:00"
seeders:
selector: td:last-child
filters:
- name: regexp
args: "(\\d+) Peers"
leechers:
text: 0
downloadvolumefactor:
text: 1
uploadvolumefactor:

View File

@ -167,8 +167,10 @@ search:
date:
selector: td:nth-child(6)
filters:
- name: append
args: " +01:00" # CET
- name: dateparse
args: "02/01/2006"
args: "02/01/2006 -07:00"
download:
selector: a[href^="download.php"]
attribute: href

View File

@ -40,7 +40,7 @@ caps:
search:
paths:
- path: "{{ if .Keywords }}search.php?keyword={{ .Keywords }}{{else}}{{end}}"
- path: "{{ if .Keywords }}search.php?keyword={{ .Keywords }}{{ else }}{{ end }}"
rows:
selector: table#listTable > tbody > tr:has(a[href^="sort-"])

View File

@ -28,6 +28,7 @@ caps:
modes:
search: [q]
tv-search: [q, season, ep]
movie-search: [q]
settings:
- name: username