thepiratebay: add keyword filters. resolves #7291

This commit is contained in:
ilike2burnthing 2021-10-21 04:23:06 +01:00 committed by GitHub
parent 36607f2c78
commit a890a142cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 0 deletions

View File

@ -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: $