mirror of
https://github.com/Jackett/Jackett
synced 2025-03-10 06:03:09 +00:00
hebits: switch to json. resolves #13808
This commit is contained in:
parent
23f1ea6a7b
commit
0c82b4144e
1 changed files with 52 additions and 51 deletions
|
@ -61,11 +61,15 @@ login:
|
|||
inputs:
|
||||
cookie: "{{ .Config.cookie }}"
|
||||
test:
|
||||
path: torrents.php
|
||||
path: /
|
||||
selector: a[href*="/logout.php?auth="]
|
||||
|
||||
search:
|
||||
paths:
|
||||
- path: torrents.php
|
||||
- path: ajax.php
|
||||
response:
|
||||
type: json
|
||||
|
||||
inputs:
|
||||
searchstr: "{{ if .Query.IMDBID }}{{ .Query.IMDBID }}{{ else }}{{ .Keywords }}{{ end }}"
|
||||
order_by: "{{ .Config.sort }}"
|
||||
|
@ -74,29 +78,21 @@ search:
|
|||
imdblt: 10
|
||||
# 1 freeleech, 2 neutral, 3 50%, 4 2x, 5 3x, 9 75%, 11 only perks, 0 normal
|
||||
freetorrent: "{{ if .Config.freeleech }}1{{ else }}{{ end }}"
|
||||
action: advanced
|
||||
searchsubmit: 1
|
||||
action: browse
|
||||
$raw: "{{ range .Categories }}filter_cat[{{.}}]=1&{{end}}"
|
||||
|
||||
rows:
|
||||
selector: .torrent
|
||||
selector: response.results
|
||||
attribute: torrents
|
||||
multiple: true
|
||||
|
||||
fields:
|
||||
_id:
|
||||
selector: torrentId
|
||||
category:
|
||||
selector: .tooltip
|
||||
case:
|
||||
"div[class*=\"movies\"]": 1
|
||||
"div[class*=\"tv\"]": 2
|
||||
"div[class*=\"theater\"]": 3
|
||||
"div[class*=\"software\"]": 4
|
||||
"div[class*=\"games\"]": 5
|
||||
"div[class*=\"music\"]": 6
|
||||
"div[class*=\"books\"]": 7
|
||||
"div[class*=\"packs\"]": 8
|
||||
"div[class*=\"porno\"]": 9
|
||||
"div[class*=\"other\"]": 10
|
||||
selector: ..categoryID
|
||||
title_notenglish:
|
||||
selector: .torrent_info:not(:contains("a")):not(:contains("e")):not(:contains("i")):not(:contains("o")):not(:contains("u")):not(:contains("y"))
|
||||
selector: release:not(:contains("a")):not(:contains("e")):not(:contains("i")):not(:contains("o")):not(:contains("u")):not(:contains("y"))
|
||||
optional: true
|
||||
filters:
|
||||
# space out the book language at the end of the title
|
||||
|
@ -106,7 +102,7 @@ search:
|
|||
- name: re_replace
|
||||
args: ["(עברית)$", " - עברית"] # Hebrew
|
||||
title_english:
|
||||
selector: .torrent_info
|
||||
selector: release
|
||||
optional: true
|
||||
filters:
|
||||
- name: append
|
||||
|
@ -116,54 +112,59 @@ search:
|
|||
title:
|
||||
text: "{{ if .Result.title_notenglish }}{{ .Result.title_notenglish }}{{ else }}{{ .Result.title_english }}{{ end }}"
|
||||
details:
|
||||
selector: a[href*="torrentid"]
|
||||
attribute: href
|
||||
magnet:
|
||||
selector: a[href^="magnet"]
|
||||
attribute: href
|
||||
optional: true
|
||||
text: "{{ .Config.sitelink }}torrents.php?torrentid={{ .Result._id }}"
|
||||
download:
|
||||
selector: a[href^="torrents.php?action=download"]
|
||||
attribute: href
|
||||
text: "{{ .Config.sitelink }}torrents.php?action=download&id={{ .Result._id }}"
|
||||
poster:
|
||||
selector: a[data-cover^="/images/"]
|
||||
attribute: data-cover
|
||||
selector: ..cover
|
||||
imdbid:
|
||||
selector: ..catalogue
|
||||
files:
|
||||
selector: td:nth-child(4)
|
||||
selector: fileCount
|
||||
date:
|
||||
selector: td:nth-child(5) span
|
||||
attribute: title
|
||||
selector: time
|
||||
filters:
|
||||
- name: append
|
||||
args: " +02:00" # IST
|
||||
- name: dateparse
|
||||
args: "02/01/2006, 15:04 -07:00"
|
||||
args: "2006-01-02 15:04:05 -07:00"
|
||||
size:
|
||||
selector: td:nth-child(6)
|
||||
selector: size
|
||||
grabs:
|
||||
selector: td:nth-child(7)
|
||||
selector: snatches
|
||||
seeders:
|
||||
selector: td:nth-child(8)
|
||||
selector: seeders
|
||||
leechers:
|
||||
selector: td:nth-child(9)
|
||||
selector: leechers
|
||||
description:
|
||||
selector: ..tags
|
||||
_half:
|
||||
selector: isHalfFreeleech
|
||||
_free:
|
||||
selector: isFreeleech
|
||||
_x2:
|
||||
selector: isUploadX2
|
||||
_x3:
|
||||
selector: isUploadX3
|
||||
_quarter:
|
||||
selector: isQuarterLeech
|
||||
_neutral:
|
||||
selector: isNeutralLeech
|
||||
_personal:
|
||||
selector: isPersonalFreeleech
|
||||
downloadvolumefactor_special:
|
||||
optional: true
|
||||
text: "{{ if eq .Result._half \"True\" }}0.5{{ else }}{{ end }}{{ if eq .Result._quarter \"True\" }}0.25{{ else }}{{ end }}{{ if eq .Result._neutral \"True\" }}0{{ else }}{{ end }}{{ if eq .Result._free \"True\" }}0{{ else }}{{ end }}{{ if eq .Result._personal \"True\" }}0{{ else }}{{ end }}"
|
||||
downloadvolumefactor:
|
||||
case:
|
||||
"strong.tl_notice[title*=\"חצי פריליץ'\"]": 0.5 # 50%
|
||||
"strong.tl_notice[title*=\"75% פריליץ'!\"]": 0.25 # 75%
|
||||
"strong.tl_notice[title*=\"נטרלי\"]": 0 # neutral
|
||||
"strong.tl_notice[title*=\"פריליץ'\"]": 0 # freeleech
|
||||
"*": 1
|
||||
text: "{{ if .Result.downloadvolumefactor_special }}{{ .Result.downloadvolumefactor_special }}{{ else }}1{{ end }}"
|
||||
uploadvolumefactor_special:
|
||||
optional: true
|
||||
text: "{{ if eq .Result._x3 \"True\" }}3{{ else }}{{ end }}{{ if eq .Result._x2 \"True\" }}2{{ else }}{{ end }}{{ if eq .Result._neutral \"True\" }}0{{ else }}{{ end }}"
|
||||
uploadvolumefactor:
|
||||
case:
|
||||
"strong.tl_notice[title*=\"העלאה משולשת\"]": 3 # 3x
|
||||
"strong.tl_notice[title*=\"העלאה כפולה\"]": 2 # 2x
|
||||
"strong.tl_notice[title*=\"נטרלי\"]": 0 # neutral
|
||||
"*": 1
|
||||
text: "{{ if .Result.uploadvolumefactor_special }}{{ .Result.uploadvolumefactor_special }}{{ else }}1{{ end }}"
|
||||
minimumratio:
|
||||
text: 1.0
|
||||
minimumseedtime:
|
||||
# 7 days (as seconds = 7 x 24 x 60 x 60)
|
||||
text: 604800
|
||||
description:
|
||||
selector: div.tags
|
||||
# Gazelle
|
||||
# JSON Gazelle
|
||||
|
|
Loading…
Add table
Reference in a new issue