bitturk: date detection in line with other tsue 2.2

This commit is contained in:
Garfield69 2022-01-29 12:13:31 +13:00
parent e8e7554b5a
commit 6b86353963
1 changed files with 11 additions and 13 deletions

View File

@ -161,16 +161,10 @@ search:
download:
selector: a[href*="?p=torrents&pid=10&action=download"]
attribute: href
date_ago:
optional: true
# <abbr class="timeago" data-time="1643407907">
# JS presented as 'a moment ago' or '3 minutes ago' etc
selector: td.torrent_name abbr.timeago
attribute: data-time
date_year:
optional: true
# Uploaded 30-01-2019 15:02 by
selector: td.torrent_name:not(:contains(" at ")):not(:has(abbr.timeago))
selector: td.torrent_name:not(:contains(" at ")):not(:has(abbr[data-time]))
optional: true
filters:
- name: regexp
args: "Uploaded (.+?) by"
@ -179,20 +173,24 @@ search:
- name: dateparse
args: "02-01-2006 15:04 -07:00"
date_day:
optional: true
# Uploaded Friday at 05:11 by
# Uploaded Today at 00:48 by
# Uploaded Yesterday at 23:57 by
selector: td.torrent_name:contains(" at "):not(:has(abbr.timeago))
selector: td.torrent_name:contains(" at "):not(:has(abbr[data-time]))
optional: true
filters:
- name: regexp
args: "Uploaded (.+?) by"
- name: replace
args: [" at ", " "]
- name: append
args: " +00:00" # auto adjusted by site account profile
- name: fuzzytime
date_unix:
# within the hour (unix)
selector: abbr[data-time]
attribute: data-time
optional: true
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 }}"
text: "{{ if or .Result.date_year .Result.date_unix .Result.date_day }}{{ or .Result.date_year .Result.date_unix .Result.date_day }}{{ else }}now{{ end }}"
size:
selector: a[rel="torrent_size"]
seeders: