From 6b8635396394abe7def54ebdf383ad89e86f78e4 Mon Sep 17 00:00:00 2001 From: Garfield69 Date: Sat, 29 Jan 2022 12:13:31 +1300 Subject: [PATCH] bitturk: date detection in line with other tsue 2.2 --- src/Jackett.Common/Definitions/bitturk.yml | 24 ++++++++++------------ 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/src/Jackett.Common/Definitions/bitturk.yml b/src/Jackett.Common/Definitions/bitturk.yml index 2fede6ee5..2656879a1 100644 --- a/src/Jackett.Common/Definitions/bitturk.yml +++ b/src/Jackett.Common/Definitions/bitturk.yml @@ -161,16 +161,10 @@ search: download: selector: a[href*="?p=torrents&pid=10&action=download"] attribute: href - date_ago: - optional: true - # - # 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: