From ceaaefe538822d665bf5570669a83dc9f9d0c4cf Mon Sep 17 00:00:00 2001 From: ilike2burnthing <59480337+ilike2burnthing@users.noreply.github.com> Date: Tue, 7 Nov 2023 22:36:37 +0000 Subject: [PATCH] cpasbienclone & torrent9: simplify French size filters (#14829) --- .../Definitions/cpasbienclone.yml | 22 +++---------------- src/Jackett.Common/Definitions/torrent9.yml | 10 ++------- 2 files changed, 5 insertions(+), 27 deletions(-) diff --git a/src/Jackett.Common/Definitions/cpasbienclone.yml b/src/Jackett.Common/Definitions/cpasbienclone.yml index 133b5b433..c707a7263 100644 --- a/src/Jackett.Common/Definitions/cpasbienclone.yml +++ b/src/Jackett.Common/Definitions/cpasbienclone.yml @@ -118,26 +118,10 @@ search: selector: div.poid filters: - name: re_replace - args: ["\\.(\\d)Ko", "$1X00"] + args: ["(\\w)o", "$1B"] + # keyword search returns nnnnn.n in MB but without unit indicator - name: re_replace - args: ["Ko", "000"] - - name: re_replace - args: ["\\.(\\d)Mo", "$1X00000"] - - name: re_replace - args: ["Mo", "000000"] - - name: re_replace - args: ["\\.(\\d)Go", "$1X00000000"] - - name: re_replace - args: ["Go", "000000000"] - - name: re_replace - args: ["\\.(\\d)To", "$1X00000000000"] - - name: re_replace - args: ["To", "000000000000"] - - name: replace - args: ["X", ""] - # this is for the search with keywords which returns sizes nnnnn.n without unit indicator. - - name: re_replace - args: ["(\\d+)\\.\\d", "$1 MB"] + args: ["(\\d+\\.\\d)$", "$1MB"] date: text: now seeders: diff --git a/src/Jackett.Common/Definitions/torrent9.yml b/src/Jackett.Common/Definitions/torrent9.yml index 3a1655ab2..19d7c3f68 100644 --- a/src/Jackett.Common/Definitions/torrent9.yml +++ b/src/Jackett.Common/Definitions/torrent9.yml @@ -177,14 +177,8 @@ search: size: selector: "{{ if .Keywords }}td:nth-child(3){{ else }}td:nth-child(2){{ end }}" filters: - - name: replace - args: ["Ko", "KB"] - - name: replace - args: ["Mo", "MB"] - - name: replace - args: ["Go", "GB"] - - name: replace - args: ["To", "TB"] + - name: re_replace + args: ["(\\w)o", "$1B"] seeders: selector: "{{ if .Keywords }}td:nth-child(4){{ else }}td:nth-child(3){{ end }}" optional: true