extratorrent: handle missing category or no-hits. resolves #7108

also handle some date exceptions.
This commit is contained in:
Garfield69 2020-02-06 09:53:39 +13:00
parent f718052e4a
commit e215870735
1 changed files with 16 additions and 3 deletions

View File

@ -946,9 +946,11 @@
fields: fields:
category: category:
selector: a[href*="/category/"] selector: a[href*="/category/"], a[href="#"]
attribute: href attribute: href
filters: filters:
- name: replace #7108 provide default for missing category
args: ["#", "/category/9/"]
- name: regexp - name: regexp
args: "/category/(\\d+)/" args: "/category/(\\d+)/"
title: title:
@ -963,14 +965,25 @@
selector: a[href^="magnet:?xt="] selector: a[href^="magnet:?xt="]
attribute: href attribute: href
date: date:
selector: td:nth-last-of-type(5):contains(":") selector: td:nth-last-of-type(5):contains("Y-day-"), td:nth-last-of-type(5):contains("Today-")
optional: true
filters:
- name: replace
args: ["\xA0", " "]
- name: re_replace
args: ["(Today-.*)", "Today"]
- name: re_replace
args: ["(Y-day-.*)", "Yesterday"]
- name: fuzzytime
date:
selector: td:nth-last-of-type(5):contains(":"):not(:contains("Y-day-")):not(:contains("Today-"))
optional: true optional: true
filters: filters:
- name: replace - name: replace
args: ["\xA0", " "] args: ["\xA0", " "]
- name: fuzzytime - name: fuzzytime
date: date:
selector: td:nth-last-of-type(5):not(:contains(":")) selector: td:nth-last-of-type(5):not(:contains(":")):not(:contains("Y-day-")):not(:contains("Today-"))
optional: true optional: true
filters: filters:
- name: replace - name: replace