From d034213ea15da1605914fa0b87f7617d16685661 Mon Sep 17 00:00:00 2001 From: Garfield69 Date: Fri, 5 Nov 2021 07:00:08 +1300 Subject: [PATCH] punkshorror: various improvements - find full title if available - filter rows with andmatch to avoid unrelated matches - use ULVF - add multi category filtering --- .../Definitions/punkshorror.yml | 22 ++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/src/Jackett.Common/Definitions/punkshorror.yml b/src/Jackett.Common/Definitions/punkshorror.yml index 6d183c34c..f5785744d 100644 --- a/src/Jackett.Common/Definitions/punkshorror.yml +++ b/src/Jackett.Common/Definitions/punkshorror.yml @@ -87,8 +87,7 @@ search: paths: - path: browse.php inputs: - # site does not support multiple cats - cat: 0 + $raw: "{{ range .Categories }}c{{.}}=1&{{end}}" onlyname: 1 search: "{{ .Keywords }}" # 0 active, 1 all, 2 deadonly, 3 freeleech @@ -99,6 +98,8 @@ search: rows: selector: table.alap99 > tbody#linkhatter > tr + filters: + - name: andmatch fields: category: @@ -107,8 +108,16 @@ search: filters: - name: querystring args: cat + title_default: + # can be abbreviated + selector: a[href^="details.php?id="] + title_optional: + # usually full length + selector: a[href^="details.php?id="] + attribute: title + optional: true title: - selector: td[align="left"] > a.altlink > b + text: "{{ if .Result.title_optional }}{{ .Result.title_optional }}{{ else }}{{ .Result.title_default }}{{ end }}" details: selector: a[href^="details.php?id="] attribute: href @@ -140,7 +149,7 @@ search: grabs: selector: td:nth-last-child(4) seeders: - selector: td:nth-last-child(3) font + selector: td:nth-last-child(3) leechers: selector: td:nth-last-child(2) downloadvolumefactor: @@ -148,7 +157,10 @@ search: img[src="pic/golden.gif"]: 0 "*": 1 uploadvolumefactor: - text: 1 + selector: td:nth-child(7) > center > b > font + filters: + - name: regexp + args: (\d+) minimumratio: text: 0.8 minimumseedtime: