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

This commit is contained in:
Garfield69 2021-10-23 17:16:24 +13:00
parent b5608f8c73
commit afbc915920
13 changed files with 94 additions and 78 deletions

View File

@ -140,15 +140,15 @@ search:
filters:
- name: querystring
args: category
a_title:
title_default:
# is often abbreviated
selector: a[href*="details.php?id="]
d_title:
title_optional:
# usually longer than details title
selector: div[id^="port-content-"] div
optional: true
title:
text: "{{ if .Result.d_title }}{{ .Result.d_title }}{{ else }}{{ .Result.a_title }}{{ end }}"
text: "{{ if .Result.title_optional }}{{ .Result.title_optional }}{{ else }}{{ .Result.title_default }}{{ end }}"
details:
selector: a[href*="details.php?id="]
attribute: href

View File

@ -182,7 +182,7 @@ search:
download:
selector: a[href*="?p=torrents"][href*="&action=download"]
attribute: href
imdb:
imdbid:
selector: a[href*="imdb.com/title/tt"]
attribute: href
size:
@ -197,7 +197,6 @@ search:
selector: a[rel="fancybox"]
attribute: href
description:
optional: true
selector: div.torrentDetails > div:has(span.floatright)
downloadvolumefactor:
case:
@ -206,11 +205,12 @@ search:
uploadvolumefactor:
case:
"*": 1
date:
date_unix:
optional: true
selector: div.torrentOwner > abbr.timeago
attribute: data-time
date:
date_day:
# Uploaded Yesterday at 20:12 by
optional: true
selector: div.torrentOwner:not(:has(abbr.timeago)):contains("day"), div.torrentOwner:not(:has(abbr.timeago)):contains("σήμερα"), div.torrentOwner:not(:has(abbr.timeago)):contains("εχθές"), div.torrentOwner:not(:has(abbr.timeago)):contains("Δευτέρα"), div.torrentOwner:not(:has(abbr.timeago)):contains("Τρίτη"), div.torrentOwner:not(:has(abbr.timeago)):contains("Τετάρτη"), div.torrentOwner:not(:has(abbr.timeago)):contains("Πέμπτη"), div.torrentOwner:not(:has(abbr.timeago)):contains("Παρασκευή"), div.torrentOwner:not(:has(abbr.timeago)):contains("Σάββατο"), div.torrentOwner:not(:has(abbr.timeago)):contains("Κυριακή")
remove: span
@ -246,7 +246,8 @@ search:
- name: replace
args: ["Κυριακή", "Sunday"]
- name: fuzzytime
date:
date_year:
# 23-10-2021 22:59
optional: true
selector: div.torrentOwner:not(:has(abbr.timeago)):contains("-")
remove: span
@ -269,8 +270,7 @@ search:
args: " +00:00" # auto adjusted by site account profile
- name: dateparse
args: "02-01-2006 15:04 -07:00"
date:
# <br /> Uploaded Saturday at 21:09 by
date_other:
optional: true
selector: td.torrent_name
remove: div, a, span
@ -285,4 +285,6 @@ search:
args: " +00:00" # auto adjusted by site account profile
- name: dateparse
args: "02-01-2006 15:04 -07:00"
date:
text: "{{ if .Result.date_unix .Result.date_day or .Result.date_year or .Result.date_other }}{{ or .Result.date_unix .Result.date_day or .Result.date_year or .Result.date_other }}{{ else }}now{{ end }}"
# TSUE 2.2

View File

@ -65,7 +65,6 @@ settings:
- name: useragent
type: text
label: User-Agent
label: User-Agent
- name: info_useragent
type: info
label: How to get the User-Agent
@ -106,16 +105,18 @@ search:
download:
selector: a[href^="download.php?torrent="]
attribute: href
title:
title_default:
selector: a[href^="details.php?id="] > b
attribute: title
title:
title_optional:
selector: a[href^="details.php?id="] > b[title*="Torrent neve:"]
optional: true
attribute: title
filters:
- name: regexp
args: "Torrent neve: (.*?)<"
title:
text: "{{ if .Result.title_optional }}{{ .Result.title_optional }}{{ else }}{{ .Result.title_default }}{{ end }}"
description:
selector: a[href^="details.php?id="] > b
attribute: title
@ -131,7 +132,7 @@ search:
details:
selector: a[href^="details.php?id="]
attribute: href
imdb:
imdbid:
selector: a[href*="imdb.com/title/tt"]
attribute: href
poster:

View File

@ -262,11 +262,11 @@ search:
args: f
description:
selector: td span.iconDL
size:
text: 0
size:
size_optional:
selector: td:nth-last-child(5) > u
optional: true
size:
text: "{{ if .Result.size_optional }}{{ .Result.size_optional }}{{ else }}0 B{{ end }}"
seeders:
selector: td.seedmed
leechers:

View File

@ -146,9 +146,8 @@ search:
leechers:
text: 1
date:
# Добавлен: 5 октября 2021 в 06:56:08
selector: p
filters:
# Добавлен: 5 октября 2021 в 06:56:08
filters:
- name: replace
args: ["Добавлен: ", ""]

View File

@ -123,7 +123,7 @@ search:
filters:
- name: replace
args: ["span_bookmark_", "download.php?id="]
imdb:
imdbid:
selector: a[href*="imdb.com/title/tt"]
attribute: href
poster:

View File

@ -142,22 +142,22 @@ search:
args: " +01:00" # CET
- name: dateparse
args: "2006.01.02. 15:04 -07:00"
downloadvolumefactor:
text: 1
downloadvolumefactor:
downloadvolumefactor_optional:
optional: true
selector: b:has(img[src="templates/default/images/header/arrowdown.gif"])
filters:
- name: regexp
args: (\d+\.*\d*)
uploadvolumefactor:
text: 1
uploadvolumefactor:
downloadvolumefactor:
text: "{{ if .Result.downloadvolumefactor_optional }}{{ .Result.downloadvolumefactor_optional }}{{ else }}1{{ end }}"
uploadvolumefactor_optional:
optional: true
selector: b:has(img[src="templates/default/images/header/arrowup.gif"])
filters:
- name: regexp
args: (\d+)
uploadvolumefactor:
text: "{{ if .Result.uploadvolumefactor_optional }}{{ .Result.uploadvolumefactor_optional }}{{ else }}1{{ end }}"
minimumratio:
text: 0.6
minimumseedtime:

View File

@ -39,67 +39,65 @@ search:
fields:
category:
text: 1
title:
selector: div.titulo
filters:
- name: append
args: " "
title|append:
multi:
optional: true
selector: img.flageitor:nth-child(2)
filters:
- name: re_replace
args: [".*", "MULTi "]
title|append:
eng:
optional: true
selector: img.flageitor[src^="/wp-content/themes/moviesdvdr/images/english.png"]
filters:
- name: re_replace
args: [".*", "English "]
title|append:
esp:
optional: true
selector: img.flageitor[src^="/wp-content/themes/moviesdvdr/images/espanol.png"]
filters:
- name: re_replace
args: [".*", "SPANiSH "]
title|append:
ita:
optional: true
selector: img.flageitor[src^="/wp-content/themes/moviesdvdr/images/italian.png"]
filters:
- name: re_replace
args: [".*", "iTALiAN "]
title|append:
deu:
optional: true
selector: img.flageitor[src^="/wp-content/themes/moviesdvdr/images/german.png"]
filters:
- name: re_replace
args: [".*", "German "]
title|append:
fra:
optional: true
selector: img.flageitor[src^="/wp-content/themes/moviesdvdr/images/french.png"]
filters:
- name: re_replace
args: [".*", "FRENCH "]
title|append:
oth:
optional: true
selector: img.flageitor[src^="/wp-content/themes/moviesdvdr/images/other.png"]
filters:
- name: re_replace
args: [".*", "oTHer "]
title|append:
doc:
optional: true
selector: div.imagem span:contains("Documental")
filters:
- name: re_replace
args: ["Documental", "DOC "]
title|append:
3x:
optional: true
selector: div.imagem span:contains("Adulto")
filters:
- name: replace
args: ["Adulto", "XXX "]
title|append:
text: "DVDRiP XViD"
title:
selector: div.titulo
filters:
- name: append
args: " {{ .Result.multi }}{{ .Result.eng }}{{ .Result.esp }}{{ .Result.ita }}{{ .Result.deu }}{{ .Result.fra }}{{ .Result.oth }}{{ .Result.doc }}{{ .Result.3x }}DVDRiP XViD"
details:
selector: a
attribute: href

View File

@ -131,12 +131,16 @@ search:
selector: table.torrents > tbody > tr:has(table.torrentname)
fields:
title: # shortened for long release names
title_default:
# shortened for long release names
selector: a[href^="details.php?id="] > b
title:
optional: true # not available if IMDB tooltips are turned on
title_optional:
# not available if IMDB tooltips are turned on
optional: true
selector: a[title][href^="details.php?id="]
attribute: title
title:
text: "{{ if .Result.title_optional }}{{ .Result.title_optional }}{{ else }}{{ .Result.title_default }}{{ end }}"
category:
selector: a[href^="?cat="]
attribute: href
@ -155,7 +159,7 @@ search:
filters:
- name: replace
args: ["pic/nopic.jpg", ""]
imdb:
imdbid:
selector: a[href*="imdb.com/title/tt"]
attribute: href
size:
@ -166,15 +170,7 @@ search:
selector: td.rowfollow:nth-last-child(5)
leechers:
selector: td.rowfollow:nth-last-child(4)
date:
selector: td.rowfollow:nth-last-child(7):not(:has(span))
optional: true
filters:
- name: append
args: " +08:00" # CST
- name: dateparse
args: "2006-01-0215:04:05 -07:00"
date:
date_added:
selector: td.rowfollow:nth-last-child(7) > span[title]
optional: true
attribute: title
@ -183,6 +179,16 @@ search:
args: " +08:00" # CST
- name: dateparse
args: "2006-01-02 15:04:05 -07:00"
date_elapsed:
selector: td.rowfollow:nth-last-child(7):not(:has(span))
optional: true
filters:
- name: append
args: " +08:00" # CST
- name: dateparse
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 }}"
downloadvolumefactor:
case:
img.pro_free: 0

View File

@ -127,12 +127,16 @@ search:
selector: table.torrents > tbody > tr:has(table.torrentname)
fields:
title: # shortened for long release names
title_default:
# shortened for long release names
selector: a[href^="details.php?id="] > b
title:
optional: true # not available if IMDB tooltips are turned on
title_optional:
# not available if IMDB tooltips are turned on
optional: true
selector: a[title][href^="details.php?id="]
attribute: title
title:
text: "{{ if .Result.title_optional }}{{ .Result.title_optional }}{{ else }}{{ .Result.title_default }}{{ end }}"
category:
selector: a[href^="?cat="]
attribute: href
@ -151,7 +155,7 @@ search:
filters:
- name: replace
args: ["pic/nopic.jpg", ""]
imdb:
imdbid:
selector: a[href*="imdb.com/title/tt"]
attribute: href
size:
@ -162,15 +166,7 @@ search:
selector: td.rowfollow:nth-last-child(5)
leechers:
selector: td.rowfollow:nth-last-child(4)
date:
selector: td.rowfollow:nth-last-child(7):not(:has(span))
optional: true
filters:
- name: append
args: " +08:00" # CST
- name: dateparse
args: "2006-01-0215:04:05 -07:00"
date:
date_added:
selector: td.rowfollow:nth-last-child(7) > span[title]
optional: true
attribute: title
@ -179,6 +175,16 @@ search:
args: " +08:00" # CST
- name: dateparse
args: "2006-01-02 15:04:05 -07:00"
date_elapsed:
selector: td.rowfollow:nth-last-child(7):not(:has(span))
optional: true
filters:
- name: append
args: " +08:00" # CST
- name: dateparse
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 }}"
downloadvolumefactor:
case:
img.pro_free: 0

View File

@ -137,16 +137,16 @@ search:
args: " +01:00" # CET
- name: dateparse
args: "2 January 2006 15:04:05 -07:00"
seeders:
text: 0
seeders:
seeders_optional:
optional: true
selector: td:nth-child(4) table tr:nth-child(3) td:nth-child(5) font b
leechers:
text: 0
leechers:
seeders:
text: "{{ if .Result.seeders_optional }}{{ .Result.seeders_optional }}{{ else }}0{{ end }}"
leechers_optional:
optional: true
selector: td:nth-child(4) table tr:nth-child(3) td:nth-child(5) font font b
leechers:
text: "{{ if .Result.leechers_optional }}{{ .Result.leechers_optional }}{{ else }}0{{ end }}"
downloadvolumefactor:
text: 0
uploadvolumefactor:

View File

@ -157,10 +157,10 @@ search:
fields:
category:
text: Other
title:
title_default:
# fallback title (to prevent abend if optional is not found)
text: "title not found"
title:
title_optional:
optional: true
selector: td.doubleindent, td.singleindent a[href^="/index.php?showtopic="]
filters:
@ -196,6 +196,8 @@ search:
args: ["(?i)^Al-Jazeera (.*)", "{{ if .Config.dropbbc }}{{ else }}Al-Jazeera {{ end }}$1"]
- name: append
args: "{{ if .Config.stripS01E01 }}{{ else }} S01E01{{ end }}"
title:
text: "{{ if .Result.title_optional }}{{ .Result.title_optional }}{{ else }}{{ .Result.title_default }}{{ end }}"
details:
optional: true
selector: td.singleindent a[href^="/index.php?showtopic="]

View File

@ -157,10 +157,10 @@ search:
fields:
category:
text: Other
title:
title_default:
# fallback title (to prevent abend if optional is not found)
text: "title not found"
title:
title_optional:
optional: true
selector: td.doubleindent, td.singleindent a[href^="/index.php?showtopic="]
filters:
@ -196,6 +196,8 @@ search:
args: ["(?i)^Al-Jazeera (.*)", "{{ if .Config.dropbbc }}{{ else }}Al-Jazeera {{ end }}$1"]
- name: append
args: "{{ if .Config.stripS01E01 }}{{ else }} S01E01{{ end }}"
title:
text: "{{ if .Result.title_optional }}{{ .Result.title_optional }}{{ else }}{{ .Result.title_default }}{{ end }}"
details:
optional: true
selector: td.singleindent a[href^="/index.php?showtopic="]