piratbit: new layout selectors

they have dropped unix dates and changed title selector and medal img
amended other selectors to be non language reliant
This commit is contained in:
Garfield69 2023-09-26 15:36:47 +13:00
parent 695c4a1ebc
commit ee10fa0cd6
1 changed files with 29 additions and 13 deletions

View File

@ -680,7 +680,7 @@ search:
da: 1 da: 1
ss: "{{ .Keywords }}" ss: "{{ .Keywords }}"
gold: "{{ if .Config.freeleech }}1{{ else }}{{ end }}" gold: "{{ if .Config.freeleech }}1{{ else }}{{ end }}"
submit: "Поиск" submit: Поиск
keywordsfilters: keywordsfilters:
- name: diacritics - name: diacritics
@ -693,17 +693,17 @@ search:
args: ["(?i)\\bS0*(\\d+)E0*(\\d+)\\b", "сезон $1 сери $2"] args: ["(?i)\\bS0*(\\d+)E0*(\\d+)\\b", "сезон $1 сери $2"]
rows: rows:
selector: tr[id^="tor_"]:not(:has(span[title="закрыто"])):not(:has(span[title="неоформлено"])) selector: tr[id^="tor_"]:has(a.dlLink)
fields: fields:
category: category:
selector: td a.gen selector: a.gen
attribute: href attribute: href
filters: filters:
- name: querystring - name: querystring
args: f args: f
title: title:
selector: td a.genmed selector: a.gengood
filters: filters:
# normalize to SXXEYY format # normalize to SXXEYY format
- name: re_replace - name: re_replace
@ -769,30 +769,46 @@ search:
- name: append - name: append
args: "{{ if .Config.addrussiantotitle }} RUS{{ else }}{{ end }}" args: "{{ if .Config.addrussiantotitle }} RUS{{ else }}{{ end }}"
details: details:
selector: td a.genmed selector: a.gengood
attribute: href attribute: href
download: download:
selector: td div a.dLink selector: a.dlLink
attribute: href attribute: href
description: description:
selector: td:first-child span selector: td:first-child span
attribute: title attribute: title
size: size:
selector: td > u selector: a.dlLink
date_day:
# 23:18
selector: td:last-child > p:first-child:not(:contains("-"))
optional: true
filters:
- name: append
args: " +03:00" # MSK
- name: dateparse
args: "HH:mm zzz"
date_year:
# 13:44 25-09-23
selector: td:last-child > p:first-child:contains("-")
optional: true
filters:
- name: append
args: " +03:00" # MSK
- name: dateparse
args: "HH:mm d-MM-yy zzz"
date: date:
# unix text: "{{ if or .Result.date_day .Result.date_year }}{{ or .Result.date_day .Result.date_year }}{{ else }}now{{ end }}"
selector: td[title="Добавлен"] > u, td[title="Added"] > u
# Russian and Ukranian and English languages are supported
grabs: grabs:
selector: td[title^="Ответов"], td[title^="Відповідей"], td[title^="Replies"] selector: td:nth-child(7)
seeders: seeders:
selector: td.seedmed selector: td.seedmed
leechers: leechers:
selector: td.leechmed selector: td.leechmed
downloadvolumefactor: downloadvolumefactor:
case: case:
img[src="/images/gold.png"]: 0 img.goldrelise: 0
img[src="/images/silver.png"]: 0.5 img.silverrelise: 0.5
"*": 1 "*": 1
uploadvolumefactor: uploadvolumefactor:
text: 1 text: 1