From dc3b0bb878ac9cbdf591c3b10b2c72f73ff67cf9 Mon Sep 17 00:00:00 2001 From: ilike2burnthing <59480337+ilike2burnthing@users.noreply.github.com> Date: Wed, 10 Jan 2024 00:43:52 +0000 Subject: [PATCH] cpabien: fix for FlareSolverr, update for keyword results resolves https://github.com/FlareSolverr/FlareSolverr/issues/789 --- src/Jackett.Common/Definitions/cpabien.yml | 27 +++++++++++++++++----- 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/src/Jackett.Common/Definitions/cpabien.yml b/src/Jackett.Common/Definitions/cpabien.yml index 76f8ffc0e..565b40180 100644 --- a/src/Jackett.Common/Definitions/cpabien.yml +++ b/src/Jackett.Common/Definitions/cpabien.yml @@ -72,24 +72,34 @@ search: paths: - path: "{{ if .Keywords }}index.php?do=search&subaction=search{{ else }}{{ end }}" method: post + # postData is mandatory FlareSolverr/FlareSolverr#789 + allowEmptyInputs: true inputs: story: "{{ if .Keywords }}{{ .Keywords }}{{ else }}{{ end }}" # does not support imdbid search and does not return imdb link in results. keywordsfilters: - # if searching for season packs swith S01 to saison 1 #9712 + # if searching for season packs with S01 to saison 1 #9712 - name: re_replace - args: ["(?i)(S0)(\\d{1,2})$", "saison $2"] - - name: re_replace - args: ["(?i)(S)(\\d{1,3})$", "saison $2"] + args: ["(?i)\\b(?:S0?)(\\d{1,3})\\b", "saison $1"] rows: - selector: div#gauche > table > tbody > tr:has(a), div#dle-content > table > tbody > tr:has(a) + selector: div#gauche > table > tbody > tr:has(a), div#dle-content > a.cover2 fields: category: text: Other - title_phase1: + title_phase1_title: selector: a + title_phase1_url: + selector: a + attribute: href + filters: + - name: regexp + args: torrents\d+\/(.+?)\/ + - name: replace + args: ["-", " "] + title_phase1: + text: "{{ if .Result.title_phase1_title }}{{ .Result.title_phase1_title }}{{ else }}{{ .Result.title_phase1_url }}{{ end }}" filters: - name: re_replace args: ["(?i)\\b(FRENCH|MULTI|TRUEFRENCH|VOSTFR|SUBFRENCH)\\b(.+?)(\\b(19|20\\d{2})\\b)$", "$3 $1$2"] @@ -113,8 +123,13 @@ search: download: selector: a attribute: href + poster: + selector: img + attribute: src size: selector: div.poid + optional: true + default: "512 MB" date: text: now seeders: