punkshorror: various improvements

- find full title if available
- filter  rows with andmatch to avoid unrelated matches
- use ULVF
- add multi category filtering
This commit is contained in:
Garfield69
2021-11-05 07:00:08 +13:00
parent 1710d0f04b
commit d034213ea1

View File

@@ -87,8 +87,7 @@ search:
paths: paths:
- path: browse.php - path: browse.php
inputs: inputs:
# site does not support multiple cats $raw: "{{ range .Categories }}c{{.}}=1&{{end}}"
cat: 0
onlyname: 1 onlyname: 1
search: "{{ .Keywords }}" search: "{{ .Keywords }}"
# 0 active, 1 all, 2 deadonly, 3 freeleech # 0 active, 1 all, 2 deadonly, 3 freeleech
@@ -99,6 +98,8 @@ search:
rows: rows:
selector: table.alap99 > tbody#linkhatter > tr selector: table.alap99 > tbody#linkhatter > tr
filters:
- name: andmatch
fields: fields:
category: category:
@@ -107,8 +108,16 @@ search:
filters: filters:
- name: querystring - name: querystring
args: cat 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: title:
selector: td[align="left"] > a.altlink > b text: "{{ if .Result.title_optional }}{{ .Result.title_optional }}{{ else }}{{ .Result.title_default }}{{ end }}"
details: details:
selector: a[href^="details.php?id="] selector: a[href^="details.php?id="]
attribute: href attribute: href
@@ -140,7 +149,7 @@ search:
grabs: grabs:
selector: td:nth-last-child(4) selector: td:nth-last-child(4)
seeders: seeders:
selector: td:nth-last-child(3) font selector: td:nth-last-child(3)
leechers: leechers:
selector: td:nth-last-child(2) selector: td:nth-last-child(2)
downloadvolumefactor: downloadvolumefactor:
@@ -148,7 +157,10 @@ search:
img[src="pic/golden.gif"]: 0 img[src="pic/golden.gif"]: 0
"*": 1 "*": 1
uploadvolumefactor: uploadvolumefactor:
text: 1 selector: td:nth-child(7) > center > b > font
filters:
- name: regexp
args: (\d+)
minimumratio: minimumratio:
text: 0.8 text: 0.8
minimumseedtime: minimumseedtime: