From 06aa28486812b55b58b70a57a622f48bae0fdf4f Mon Sep 17 00:00:00 2001 From: Garfield69 Date: Fri, 1 Mar 2024 06:50:26 +1300 Subject: [PATCH] xwtorrents: title can be missing --- src/Jackett.Common/Definitions/xwtorrents.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/Jackett.Common/Definitions/xwtorrents.yml b/src/Jackett.Common/Definitions/xwtorrents.yml index 3c1dfdc0a..f71557610 100644 --- a/src/Jackett.Common/Definitions/xwtorrents.yml +++ b/src/Jackett.Common/Definitions/xwtorrents.yml @@ -143,12 +143,22 @@ search: filters: - name: querystring args: cat - title: - selector: a[href^="details.php?id="] - attribute: title download_1: selector: a[href^="download.php"] attribute: href + title_default: + # title can be missing so we use the &name= from the DL as a standby + text: "{{ .Result.download_1 }}" + filters: + - name: querystring + args: name + - name: replace + args: [".torrent", ""] + title: + selector: a[href^="details.php?id="] + attribute: title + optional: true + default: "{{ .Result.title_default }}" download_2: selector: a[href^="download2.php"] attribute: href