haidan: fix date parsing. add duban

This commit is contained in:
Garfield69 2022-05-12 10:59:34 +12:00
parent f04454a5e7
commit 7ab80d28ee
1 changed files with 21 additions and 27 deletions

View File

@ -137,25 +137,9 @@ search:
imdbid:
selector: a[href*="imdb.com/title/tt"]
attribute: href
date:
# time type: time elapsed (default)
selector: div.time_col span[title]
attribute: title
optional: true
filters:
- name: append
args: " +08:00" # CST
- name: dateparse
args: "2006-01-02 15:04:05 -07:00"
date:
# time added
selector: div.time_col:not(:has(span))
optional: true
filters:
- name: append
args: " +08:00" # CST
- name: dateparse
args: "2006-01-0215:04:05 -07:00"
doubanid:
selector: a[href*="movie.douban.com/subject/"]
attribute: href
size:
# group size. item size
selector: div.group > div.video_size, div.torrent_item > div.video_size
@ -179,20 +163,30 @@ search:
img.pro_free2up: 2
img.pro_2up: 2
"*": 1
date:
# time added
selector: div.time_col:contains("发布于"):not(:has(span[title]))
remove: a # drop uploader
date_elapsed:
# time type: time elapsed (default)
selector: div.time_col > span[title]
attribute: title
optional: true
filters:
- name: replace # remove the 'posted on' tag
args: ["发布于", ""]
- name: replace # remove anonymous tag
args: ["匿名", ""]
- name: append
args: " +08:00" # CST
- name: dateparse
args: "2006-01-02 15:04:05 -07:00"
date_added:
# time added
selector: div.time_col:contains("发布于"):not(:has(span[title]))
optional: true
remove: span
filters:
- name: replace # remove the 'posted on' tag
args: ["发布于", ""]
- name: append
args: " +08:00" # CST
- name: dateparse
args: "2006-01-02 15:04:05 -07:00"
date:
text: "{{ if or .Result.date_elapsed .Result.date_added }}{{ or .Result.date_elapsed .Result.date_added }}{{ else }}now{{ end }}"
minimumratio:
text: 1.0
# NexusPHP Standard v1.5 Beta 4 customised