From a890a142cc4d922ca997e1e4a2fc0ee0834da2ea Mon Sep 17 00:00:00 2001 From: ilike2burnthing <59480337+ilike2burnthing@users.noreply.github.com> Date: Thu, 21 Oct 2021 04:23:06 +0100 Subject: [PATCH] thepiratebay: add keyword filters. resolves #7291 --- src/Jackett.Common/Definitions/thepiratebay.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/Jackett.Common/Definitions/thepiratebay.yml b/src/Jackett.Common/Definitions/thepiratebay.yml index a24f8ece4..8112e7e48 100644 --- a/src/Jackett.Common/Definitions/thepiratebay.yml +++ b/src/Jackett.Common/Definitions/thepiratebay.yml @@ -127,6 +127,18 @@ search: - path: "https://apibay.org/{{ if .Keywords }}q.php?q={{ .Keywords }}&cat={{ join .Categories \",\" }}{{ else }}precompiled/data_top100_recent.json{{ end }}" response: type: json + keywordsfilters: + # remove it's #8829 + - name: re_replace + args: ["(?i)(it's\\s)", ""] + # replace simplified chinese as this confuses TPB search engine #7291 + - name: re_replace + args: ["([\\p{IsCJKUnifiedIdeographs}\\W]+)", "."] + # currently, the only uploader for General Hospital puts a space between season and episode + # this filter searches both formats, so "General Hospital S01E02" becomes "General Hospital S01E02 | (S01 E02)" + - name: re_replace + args: ["General Hospital S(\\d{2,3})E(\\d{2,3})", "$0 | \\(S$1 E$2\\)"] + - name: tolower rows: selector: $