assorted: conform to yaml standards by avoiding duplicate keys #11917

This commit is contained in:
Garfield69 2021-10-20 20:07:04 +13:00
parent 4294418153
commit 10e0115ee7
15 changed files with 92 additions and 67 deletions

View File

@ -172,30 +172,30 @@ search:
download: download:
selector: a[href^="/download.php"] selector: a[href^="/download.php"]
attribute: href attribute: href
grabs: grabs_optional:
text: 0
grabs:
selector: a[title="Snatcher"] selector: a[title="Snatcher"]
optional: true optional: true
files: grabs:
text: 0 text: "{{ if .Result.grabs_optional }}{{ .Result.grabs_optional }}{{ else }}0{{ end }}"
files: files_optional:
selector: a[title="Files"] selector: a[title="Files"]
optional: true optional: true
files:
text: "{{ if .Result.files_optional }}{{ .Result.files_optional }}{{ else }}0{{ end }}"
size: size:
selector: td:nth-child(6) selector: td:nth-child(6)
seeders: seeders_optional:
text: 0
seeders:
selector: a[title="Seeder"] selector: a[title="Seeder"]
optional: true optional: true
leechers: seeders:
text: 0 text: "{{ if .Result.seeders_optional }}{{ .Result.seeders_optional }}{{ else }}0{{ end }}"
leechers: leechers_optional:
selector: a[title="Leecher"] selector: a[title="Leecher"]
optional: true optional: true
leechers:
text: "{{ if .Result.leechers_optional }}{{ .Result.leechers_optional }}{{ else }}0{{ end }}"
# 2 flavours of dates # 2 flavours of dates
date: date_day:
# Heute 13:30:04 # Heute 13:30:04
# Gestern 09:10:10 # Gestern 09:10:10
selector: td:nth-child(10):contains("Heute"), td:nth-child(10):contains("Gestern") selector: td:nth-child(10):contains("Heute"), td:nth-child(10):contains("Gestern")
@ -209,7 +209,7 @@ search:
args: ["Gestern", "Yesterday"] args: ["Gestern", "Yesterday"]
- name: append - name: append
args: " +01:00" # CET args: " +01:00" # CET
date: date_year:
# 30.02.2018 23:12:50 # 30.02.2018 23:12:50
selector: td:nth-child(10):contains("."):contains(":") selector: td:nth-child(10):contains("."):contains(":")
optional: true optional: true
@ -220,6 +220,8 @@ search:
args: " +01:00" # CET args: " +01:00" # CET
- name: dateparse - name: dateparse
args: "02.01.2006 15:04:05 -07:00" args: "02.01.2006 15:04:05 -07:00"
date:
text: "{{ if or .Result.date_year .Result.date_day }}{{ or .Result.date_year .Result.date_day }}{{ else }}now{{ end }}"
downloadvolumefactor: downloadvolumefactor:
case: case:
img[alt="OU"]: 0 img[alt="OU"]: 0

View File

@ -84,11 +84,13 @@ search:
filters: filters:
- name: querystring - name: querystring
args: category args: category
title: title_default:
selector: a[href*="/details.php?id="] selector: a[href*="/details.php?id="]
title: title_optional:
optional: true optional: true
selector: div.tooltip-content > div selector: div.tooltip-content > div
title:
text: "{{ if .Result.title_optional }}{{ .Result.title_optional }}{{ else }}{{ .Result.title_default }}{{ end }}"
details: details:
selector: a[href*="/details.php?id="] selector: a[href*="/details.php?id="]
attribute: href attribute: href
@ -115,7 +117,6 @@ search:
- name: dateparse - name: dateparse
args: "02-01-2006 15:04 -07:00" args: "02-01-2006 15:04 -07:00"
poster: poster:
optional: true
selector: div.tooltip-content > img selector: div.tooltip-content > img
attribute: src attribute: src
downloadvolumefactor: downloadvolumefactor:

View File

@ -95,12 +95,14 @@ search:
selector: table.torrents > tbody > tr:has(table.torrentname) selector: table.torrents > tbody > tr:has(table.torrentname)
fields: fields:
title: title_default:
selector: a[href^="details.php?id="] selector: a[href^="details.php?id="]
title: title_optional:
optional: true optional: true
selector: a[title][href^="details.php?id="] selector: a[title][href^="details.php?id="]
attribute: title attribute: title
title:
text: "{{ if .Result.title_optional }}{{ .Result.title_optional }}{{ else }}{{ .Result.title_default }}{{ end }}"
category: category:
selector: a[href^="?cat="] selector: a[href^="?cat="]
attribute: href attribute: href
@ -116,7 +118,7 @@ search:
imdb: imdb:
selector: div.imdb_100 > a selector: div.imdb_100 > a
attribute: href attribute: href
date: date_elapsed:
# time type: time elapsed (default) # time type: time elapsed (default)
selector: td:nth-child(4) > span[title] selector: td:nth-child(4) > span[title]
attribute: title attribute: title
@ -126,7 +128,7 @@ search:
args: " +08:00" # CST args: " +08:00" # CST
- name: dateparse - name: dateparse
args: "2006-01-02 15:04:05 -07:00" args: "2006-01-02 15:04:05 -07:00"
date: date_added:
# time added # time added
selector: td:nth-child(4):not(:has(span)) selector: td:nth-child(4):not(:has(span))
optional: true optional: true
@ -135,6 +137,8 @@ search:
args: " +08:00" # CST args: " +08:00" # CST
- name: dateparse - name: dateparse
args: "2006-01-0215:04:05 -07:00" args: "2006-01-0215:04:05 -07:00"
date:
text: "{{ if or .Result.date_elapsed .Result.date_added }}{{ or .Result.date_elapsed .Result.date_added }}{{ else }}now{{ end }}"
size: size:
selector: td:nth-child(5) selector: td:nth-child(5)
seeders: seeders:

View File

@ -67,7 +67,7 @@ search:
selector: div.table-torrents > table > tbody > tr[id^="torrentposter"] selector: div.table-torrents > table > tbody > tr[id^="torrentposter"]
fields: fields:
_category: category_optional:
selector: a[href*="/categories/"] selector: a[href*="/categories/"]
optional: true optional: true
attribute: href attribute: href
@ -75,7 +75,7 @@ search:
- name: regexp - name: regexp
args: "/categories/.*?\\.(\\d+)" args: "/categories/.*?\\.(\\d+)"
category: category:
text: "{{ if .Result._category }}{{ .Result._category }}{{ else }}1{{ end }}" text: "{{ if .Result.category_optional }}{{ .Result.category_optional }}{{ else }}1{{ end }}"
title: title:
selector: a.torrent-name selector: a.torrent-name
details: details:

View File

@ -87,7 +87,7 @@ search:
selector: div.table-torrents > table > tbody > tr[id^="torrentposter"] selector: div.table-torrents > table > tbody > tr[id^="torrentposter"]
fields: fields:
_category: category_optional:
selector: a[href*="/categories/"] selector: a[href*="/categories/"]
optional: true optional: true
attribute: href attribute: href
@ -95,7 +95,7 @@ search:
- name: regexp - name: regexp
args: "/categories/.*?\\.(\\d+)" args: "/categories/.*?\\.(\\d+)"
category: category:
text: "{{ if .Result._category }}{{ .Result._category }}{{ else }}1{{ end }}" text: "{{ if .Result.category_optional }}{{ .Result.category_optional }}{{ else }}1{{ end }}"
title: title:
selector: a.torrent-name selector: a.torrent-name
details: details:

View File

@ -87,7 +87,7 @@ search:
selector: .editorLink selector: .editorLink
optional: true optional: true
author: author:
text: "{{ or (.Result._author) (.Result._editor) }}" text: "{{ or .Result._author .Result._editor }}"
_year: _year:
selector: .torYear selector: .torYear
optional: true optional: true
@ -122,21 +122,21 @@ search:
size: size:
selector: .t_files_size_added span selector: .t_files_size_added span
attribute: data-bytecount attribute: data-bytecount
seeders: seeders_optional:
text: 0
seeders:
optional: true optional: true
selector: .seeders selector: .seeders
leechers: seeders:
text: 0 text: "{{ if .Result.seeders_optional }}{{ .Result.seeders_optional }}{{ else }}0{{ end }}"
leechers: leechers_optional:
optional: true optional: true
selector: .leechers selector: .leechers
grabs: leechers:
text: 0 text: "{{ if .Result.leechers_optional }}{{ .Result.leechers_optional }}{{ else }}0{{ end }}"
grabs: grabs_optional:
optional: true optional: true
selector: .snatches selector: .snatches
grabs:
text: "{{ if .Result.grabs_optional }}{{ .Result.grabs_optional }}{{ else }}0{{ end }}"
downloadvolumefactor: downloadvolumefactor:
text: 1 text: 1
uploadvolumefactor: uploadvolumefactor:

View File

@ -85,12 +85,14 @@ search:
args: ["details.php?id=", "download.php/"] args: ["details.php?id=", "download.php/"]
- name: append - name: append
args: "/invalid.torrent" args: "/invalid.torrent"
title: title_default:
selector: a[href^="details.php?id="] selector: a[href^="details.php?id="]
title: title_optional:
optional: true optional: true
selector: a[href^="details.php?id="] selector: a[href^="details.php?id="]
attribute: title attribute: title
title:
text: "{{ if .Result.title_optional }}{{ .Result.title_optional }}{{ else }}{{ .Result.title_default }}{{ end }}"
details: details:
selector: a[href^="details.php?id="] selector: a[href^="details.php?id="]
attribute: href attribute: href
@ -124,15 +126,15 @@ search:
selector: td:nth-child(6) > u selector: td:nth-child(6) > u
downloadvolumefactor: downloadvolumefactor:
text: 0 text: 0
uploadvolumefactor: uploadvolumefactor_optional:
text: 1
uploadvolumefactor:
optional: true optional: true
selector: td:nth-child(5) > nobr > font:contains(" × ") selector: td:nth-child(5) > nobr > font:contains(" × ")
filters: filters:
- name: replace - name: replace
args: ["×", ""] args: ["×", ""]
date: uploadvolumefactor:
text: "{{ if .Result.uploadvolumefactor_optional }}{{ .Result.uploadvolumefactor_optional }}{{ else }}1{{ end }}"
date_year:
selector: td:nth-child(5):contains('.') selector: td:nth-child(5):contains('.')
optional: true optional: true
remove: font remove: font
@ -143,7 +145,7 @@ search:
args: "{{ .Today.Year }}." args: "{{ .Today.Year }}."
- name: re_replace - name: re_replace
args: ["([0-9]{4}).([0-9]+).([0-9]+) (.*)", "$2.$3.$1 $4"] args: ["([0-9]{4}).([0-9]+).([0-9]+) (.*)", "$2.$3.$1 $4"]
date: date_day:
selector: td:nth-child(5):contains('ma'), td:nth-child(5):contains("tegnap"), td:nth-child(5):contains('-') selector: td:nth-child(5):contains('ma'), td:nth-child(5):contains("tegnap"), td:nth-child(5):contains('-')
optional: true optional: true
remove: font remove: font
@ -152,6 +154,8 @@ search:
args: ["ma", "today"] args: ["ma", "today"]
- name: replace - name: replace
args: ["tegnap", "yesterday"] args: ["tegnap", "yesterday"]
date:
text: "{{ if or .Result.date_day .Result.date_year }}{{ or .Result.date_day .Result.date_year }}{{ else }}now{{ end }}"
description: description:
selector: td:nth-child(2) > div selector: td:nth-child(2) > div
# engine tbd # engine tbd

View File

@ -86,7 +86,7 @@ search:
filters: filters:
- name: regexp - name: regexp
args: "src=(.*?) " args: "src=(.*?) "
date: date_today:
# Сегодня в 09:09 от # Сегодня в 09:09 от
# Вчера в 22:47 от # Вчера в 22:47 от
selector: td:nth-child(2) div.b-info div span:nth-child(1):contains("Сегодня"), td:nth-child(2) div.b-info div span:nth-child(1):contains("Вчера") selector: td:nth-child(2) div.b-info div span:nth-child(1):contains("Сегодня"), td:nth-child(2) div.b-info div span:nth-child(1):contains("Вчера")
@ -98,7 +98,7 @@ search:
args: ["Сегодня в", "Today"] args: ["Сегодня в", "Today"]
- name: replace - name: replace
args: ["Вчера в", "Yesterday"] args: ["Вчера в", "Yesterday"]
date: date_year:
# 08 ноября 2019 в 23:53 от # 08 ноября 2019 в 23:53 от
selector: td:nth-child(2) div.b-info div span:nth-child(1):not(:contains("Сегодня")):not(:contains("Вчера")) selector: td:nth-child(2) div.b-info div span:nth-child(1):not(:contains("Сегодня")):not(:contains("Вчера"))
optional: true optional: true
@ -135,6 +135,8 @@ search:
args: " +03:00" # MSK args: " +03:00" # MSK
- name: dateparse - name: dateparse
args: "02 January 2006 15:04 -07:00" args: "02 January 2006 15:04 -07:00"
date:
text: "{{ if or .Result.date_today .Result.date_year }}{{ or .Result.date_today .Result.date_year }}{{ else }}now{{ end }}"
size: size:
selector: td:nth-child(3) selector: td:nth-child(3)
filters: filters:

View File

@ -145,7 +145,7 @@ search:
args: "src=(.*?) width" args: "src=(.*?) width"
files: files:
selector: div.torrenttable:nth-last-child(7) selector: div.torrenttable:nth-last-child(7)
date: date_year:
# Jul 4 2019 08:04 AM # Jul 4 2019 08:04 AM
selector: div.torrenttable:nth-last-child(5):not(:contains("day")) selector: div.torrenttable:nth-last-child(5):not(:contains("day"))
optional: true optional: true
@ -154,11 +154,13 @@ search:
args: " +00:00" # auto adjusted by site account profile args: " +00:00" # auto adjusted by site account profile
- name: dateparse - name: dateparse
args: "Jan 2 2006 03:04 PM -07:00" args: "Jan 2 2006 03:04 PM -07:00"
date: date_day:
# Today 02:40 PM # Today 02:40 PM
# Yesterday 09:10 AM # Yesterday 09:10 AM
selector: div.torrenttable:nth-last-child(5):contains("day") selector: div.torrenttable:nth-last-child(5):contains("day")
optional: true optional: true
date:
text: "{{ if or .Result.date_day .Result.date_year }}{{ or .Result.date_day .Result.date_year }}{{ else }}now{{ end }}"
size: size:
selector: div.torrenttable:nth-last-child(4) selector: div.torrenttable:nth-last-child(4)
grabs: grabs:

View File

@ -137,7 +137,7 @@ search:
selector: td.rowcol:nth-last-child(3) selector: td.rowcol:nth-last-child(3)
leechers: leechers:
selector: td.rowcol:nth-last-child(2) selector: td.rowcol:nth-last-child(2)
date: date_added:
optional: true optional: true
selector: font[color="5F5F5F"] selector: font[color="5F5F5F"]
filters: filters:
@ -149,7 +149,7 @@ search:
args: " +00:00" # GMT args: " +00:00" # GMT
- name: dateparse - name: dateparse
args: "2006-01-02 15:04:05 -07:00" args: "2006-01-02 15:04:05 -07:00"
date: date_upload:
optional: true optional: true
selector: a[title^="Upploaded at"] selector: a[title^="Upploaded at"]
attribute: title attribute: title
@ -162,6 +162,8 @@ search:
args: " +00:00" # GMT args: " +00:00" # GMT
- name: dateparse - name: dateparse
args: "2006-01-02 15:04:05 -07:00" args: "2006-01-02 15:04:05 -07:00"
date:
text: "{{ if or .Result.date_upload .Result.date_added }}{{ or .Result.date_upload .Result.date_added }}{{ else }}now{{ end }}"
downloadvolumefactor: downloadvolumefactor:
text: 1 text: 1
uploadvolumefactor: uploadvolumefactor:

View File

@ -161,7 +161,7 @@ search:
download: download:
selector: a[href*="?p=torrents&pid=10&action=download"] selector: a[href*="?p=torrents&pid=10&action=download"]
attribute: href attribute: href
date: date_year:
optional: true optional: true
# Uploaded 30-01-2019 15:02 by # Uploaded 30-01-2019 15:02 by
selector: td.torrent_name:not(:contains(" at ")) selector: td.torrent_name:not(:contains(" at "))
@ -172,7 +172,7 @@ search:
args: " +00:00" # auto adjusted by site account profile args: " +00:00" # auto adjusted by site account profile
- name: dateparse - name: dateparse
args: "02-01-2006 15:04 -07:00" args: "02-01-2006 15:04 -07:00"
date: date_day:
optional: true optional: true
# Uploaded Friday at 05:11 by # Uploaded Friday at 05:11 by
# Uploaded Today at 00:48 by # Uploaded Today at 00:48 by
@ -185,6 +185,8 @@ search:
args: [" at ", " "] args: [" at ", " "]
- name: append - name: append
args: " +00:00" # auto adjusted by site account profile args: " +00:00" # auto adjusted by site account profile
date:
text: "{{ if or .Result.date_year .Result.date_day }}{{ or .Result.date_year .Result.date_day }}{{ else }}now{{ end }}"
size: size:
selector: a[rel="torrent_size"] selector: a[rel="torrent_size"]
seeders: seeders:

View File

@ -106,23 +106,25 @@ search:
poster: poster:
selector: img[src*="/thbx/imgx/"] selector: img[src*="/thbx/imgx/"]
attribute: src attribute: src
files: files_optional:
text: 1
files:
selector: a[href$="filelist=1"] selector: a[href$="filelist=1"]
optional: true optional: true
files:
text: "{{ if .Result.files_optional }}{{ .Result.files_optional }}{{ else }}1{{ end }}"
size: size:
selector: td:nth-child(3) selector: td:nth-child(3)
seeders: size_optional:
text: 0 text: "{{ if .Result.size_optional }}{{ .Result.size_optional }}{{ else }}0 B{{ end }}"
seeders: seeders_optional:
selector: a[href$="toseeders=1"] selector: a[href$="toseeders=1"]
optional: true optional: true
leechers: seeders:
text: 0 text: "{{ if .Result.seeders_optional }}{{ .Result.seeders_optional }}{{ else }}0{{ end }}"
leechers: leechers_optional:
selector: a[href$="todlers=1"] selector: a[href$="todlers=1"]
optional: true optional: true
leechers:
text: "{{ if .Result.leechers_optional }}{{ .Result.leechers_optional }}{{ else }}0{{ end }}"
date: date:
text: now text: now
downloadvolumefactor: downloadvolumefactor:

View File

@ -68,11 +68,11 @@ search:
filters: filters:
- name: replace - name: replace
args: ["found ", ""] args: ["found ", ""]
files: files_optional:
text: 1
files:
selector: span.torrent_files selector: span.torrent_files
optional: true optional: true
files:
text: "{{ if .Result.files_optional }}{{ .Result.files_optional }}{{ else }}1{{ end }}"
size: size:
selector: span.torrent_size selector: span.torrent_size
seeders: seeders:

View File

@ -217,11 +217,11 @@ search:
"*": 1 "*": 1
uploadvolumefactor: uploadvolumefactor:
text: 1 text: 1
date: date_ago:
selector: td.torrent_name > abbr.timeago selector: td.torrent_name > abbr.timeago
optional: true optional: true
attribute: data-time attribute: data-time
date: date_year:
selector: td.torrent_name:not(:has(abbr.timeago)):not(:contains("day")):not(:contains("Domingo")):not(:contains("Sábado")):not(:contains("Sexta")):not(:contains("Quinta")):not(:contains("Quarta")):not(:contains("Terça")):not(:contains("Segunda")):not(:contains("ontem")):not(:contains("Hoje")) selector: td.torrent_name:not(:has(abbr.timeago)):not(:contains("day")):not(:contains("Domingo")):not(:contains("Sábado")):not(:contains("Sexta")):not(:contains("Quinta")):not(:contains("Quarta")):not(:contains("Terça")):not(:contains("Segunda")):not(:contains("ontem")):not(:contains("Hoje"))
optional: true optional: true
remove: span, a, br remove: span, a, br
@ -242,7 +242,7 @@ search:
args: " +00:00" # WET args: " +00:00" # WET
- name: dateparse - name: dateparse
args: "02-01-2006 15:04 -07:00" args: "02-01-2006 15:04 -07:00"
date: date_day:
selector: td.torrent_name:not(:has(abbr.timeago)):contains("day"), td.torrent_name:not(:has(abbr.timeago)):contains("Domingo"), td.torrent_name:not(:has(abbr.timeago)):contains("Sábado"), td.torrent_name:not(:has(abbr.timeago)):contains("Quinta"), td.torrent_name:not(:has(abbr.timeago)):contains("Sexta"), td.torrent_name:not(:has(abbr.timeago)):contains("Quarta"), td.torrent_name:not(:has(abbr.timeago)):contains("Terça"), td.torrent_name:not(:has(abbr.timeago)):contains("Segunda"), td.torrent_name:not(:has(abbr.timeago)):contains("ontem"), td.torrent_name:not(:has(abbr.timeago)):contains("Hoje") selector: td.torrent_name:not(:has(abbr.timeago)):contains("day"), td.torrent_name:not(:has(abbr.timeago)):contains("Domingo"), td.torrent_name:not(:has(abbr.timeago)):contains("Sábado"), td.torrent_name:not(:has(abbr.timeago)):contains("Quinta"), td.torrent_name:not(:has(abbr.timeago)):contains("Sexta"), td.torrent_name:not(:has(abbr.timeago)):contains("Quarta"), td.torrent_name:not(:has(abbr.timeago)):contains("Terça"), td.torrent_name:not(:has(abbr.timeago)):contains("Segunda"), td.torrent_name:not(:has(abbr.timeago)):contains("ontem"), td.torrent_name:not(:has(abbr.timeago)):contains("Hoje")
optional: true optional: true
remove: span, a, br remove: span, a, br
@ -278,4 +278,6 @@ search:
- name: replace - name: replace
args: ["Domingo", "Sunday"] args: ["Domingo", "Sunday"]
- name: fuzzytime - name: fuzzytime
date:
text: "{{ if or .Result.date_year .Result.date_day .Result.date_ago }}{{ or .Result.date_year .Result.date_day .Result.date_ago }}{{ else }}now{{ end }}"
# TSUE 2.2 # TSUE 2.2

View File

@ -93,7 +93,7 @@ search:
download: download:
selector: a[href^="download.php?id="] selector: a[href^="download.php?id="]
attribute: href attribute: href
date: date_elapsed:
# time type: time elapsed (default) # time type: time elapsed (default)
selector: td:nth-child(4) > span[title] selector: td:nth-child(4) > span[title]
attribute: title attribute: title
@ -103,7 +103,7 @@ search:
args: " +08:00" # CST args: " +08:00" # CST
- name: dateparse - name: dateparse
args: "2006-01-02 15:04:05 -07:00" args: "2006-01-02 15:04:05 -07:00"
date: date_added:
# time added # time added
selector: td:nth-child(4):not(:has(span)) selector: td:nth-child(4):not(:has(span))
optional: true optional: true
@ -112,6 +112,8 @@ search:
args: " +08:00" # CST args: " +08:00" # CST
- name: dateparse - name: dateparse
args: "2006-01-0215:04:05 -07:00" args: "2006-01-0215:04:05 -07:00"
date:
text: "{{ if or .Result.date_elapsed .Result.date_added }}{{ or .Result.date_elapsed .Result.date_added }}{{ else }}now{{ end }}"
size: size:
selector: td.rowfollow:nth-child(5) selector: td.rowfollow:nth-child(5)
seeders: seeders: