media-server-docker-compose/config/prowlarr/Definitions/snowpt.yml
Braden Jageman fd77c332fb new stuff
2024-04-07 00:37:31 -04:00

114 lines
2.7 KiB
YAML

---
id: snowpt
name: SnowPT
description: "SnowPT (SSPT) is a CHINESE Private Torrent Tracker for ANIME"
language: zh-CN
type: private
encoding: UTF-8
links:
- https://skyeysnow.com/
caps:
categorymappings:
- {id: 1, cat: TV/Anime, desc: "Anime"}
modes:
search: [q]
tv-search: [q, season, ep]
settings:
- name: username
type: text
label: Username
- name: password
type: password
label: Password
- name: freeleech
type: checkbox
label: Filter freeleech only
default: false
login:
path: login.php
method: form
form: form[id^="loginform_"]
inputs:
referer: /
loginfield: username
username: "{{ .Config.username }}"
password: "{{ .Config.password }}"
cookietime: 2592000
error:
- selector: div#messagetext:contains("登录失败") p
test:
path: /
selector: a[href*="action=logout&formhash="]
search:
paths:
# https://skyeysnow.com/forum.php?mod=torrents&cat=1&search=sei+no+kakuritsu
- path: forum.php
inputs:
mod: torrents
cat: 1
search: "{{ .Keywords }}"
rows:
selector: "table.torrents > tbody > tr:has(a[href^=\"/download.php?id=\"]){{ if .Config.freeleech }}:has(img.sp_4){{ else }}{{ end }}"
fields:
category:
text: 1
title_default:
selector: a[href^="/forum.php?mod=viewthread&tid="]
title:
selector: a[title][href^="/forum.php?mod=viewthread&tid="]
attribute: title
optional: true
default: "{{ .Result.title_default }}"
details:
selector: a[href^="/forum.php?mod=viewthread&tid="]
attribute: href
download:
selector: a[href^="/download.php?id="]
attribute: href
date_elapsed:
# time type: time elapsed (default)
selector: td:nth-child(3) > span[title]
attribute: title
optional: true
filters:
- name: append
args: " +08:00" # CST
- name: dateparse
args: "yyyy-MM-dd HH:mm:ss zzz"
date_added:
# time added
selector: td:nth-child(3):not(:has(span))
optional: true
filters:
- name: append
args: " +08:00" # CST
- name: dateparse
args: "yyyy-MM-ddHH:mm:ss zzz"
date:
text: "{{ if or .Result.date_elapsed .Result.date_added }}{{ or .Result.date_elapsed .Result.date_added }}{{ else }}now{{ end }}"
size:
selector: td:nth-child(4)
seeders:
selector: td:nth-child(5)
leechers:
selector: td:nth-child(6)
grabs:
selector: td:nth-child(7)
downloadvolumefactor:
case:
img.sp_4: 0 # FREE
img.sp_2: 0.5 # 50%
"*": 1
uploadvolumefactor:
case:
# img.sp_0: 2 # do not know what a flag of 2xSFC means, but I dont think this is a 2xupload
"*": 1
# Discuz! X3.4