hdchina: handle both date types. resolves #14587

extrapolated by using standard nexus dual date type processing and the html provided from #14573
untested
This commit is contained in:
Garfield69 2023-07-27 22:12:00 +12:00
parent 2fdc9dc46c
commit 453124d64d
1 changed files with 19 additions and 13 deletions

View File

@ -114,21 +114,27 @@ search:
selector: td.t_torrents
leechers:
selector: td.t_leech
date:
selector: td.t_time
date_elapsed:
# time type: time elapsed (default)
selector: td.t_time > span[title]
attribute: title
optional: true
filters:
- name: replace
args: ["时", " hours"]
- name: replace
args: ["分", " minutes"]
- name: replace
args: ["天", " days"]
- name: replace
args: ["年", " year"]
- name: replace
args: ["月", " months"]
- name: append
args: " ago"
args: " +08:00" # CST
- name: dateparse
args: "yyyy-MM-dd HH:mm:ss zzz"
date_added:
# time added
selector: td.t_time:not(:has(span))
optional: true
filters:
- name: append
args: " +08:00" # CST
- name: dateparse
args: "yyyy-MM-ddHH:mm:ss zzz"
date:
text: "{{ if or .Result.date_elapsed .Result.date_added }}{{ or .Result.date_elapsed .Result.date_added }}{{ else }}now{{ end }}"
downloadvolumefactor:
# DLVF and ULVF are dynamically presented via javascript so not available to cardigann
text: 1