torrentsectorcrew: rewrite selectors and category processing. resolves #4856

This commit is contained in:
Garfield69 2019-03-12 14:47:32 +13:00
parent 2ea46b5c9f
commit 1085c753d7
1 changed files with 116 additions and 81 deletions

View File

@ -4,7 +4,7 @@
description: "Torrent Sector Crew (TSC) is a GERMAN Private Torrent Tracker for MOVIES / TV / GENERAL" description: "Torrent Sector Crew (TSC) is a GERMAN Private Torrent Tracker for MOVIES / TV / GENERAL"
language: de-de language: de-de
type: private type: private
encoding: windows-1252 encoding: ISO-8859-1
links: links:
- https://tsctracker.org/ - https://tsctracker.org/
legacylinks: legacylinks:
@ -13,70 +13,64 @@
caps: caps:
categorymappings: categorymappings:
# Apps # Apps
- {id: 65, cat: PC/Phone-Android, desc: "Android"} - {id: 65, cat: PC/Phone-Android, desc: "Apps Android"}
- {id: 83, cat: PC/Phone-IOS, desc: "iOS"} - {id: 83, cat: PC/Phone-IOS, desc: "Apps iOS"}
- {id: 107, cat: PC/0day, desc: "Linux"} - {id: 107, cat: PC/0day, desc: "Apps Linux"}
- {id: 48, cat: PC/Mac, desc: "MAC"} - {id: 48, cat: PC/Mac, desc: "Apps MAC"}
- {id: 109, cat: PC, desc: "Sonstige"} - {id: 109, cat: PC, desc: "Apps Sonstige"}
- {id: 22, cat: PC/0day, desc: "Win"} - {id: 22, cat: PC/0day, desc: "Apps Win"}
# Audio # Audio
- {id: 24, cat: Audio/Audiobook, desc: "aBooks"} - {id: 24, cat: Audio/Audiobook, desc: "Audio aBooks"}
- {id: 104, cat: Audio, desc: "Disco's"} - {id: 104, cat: Audio, desc: "Audio Disco's"}
- {id: 38, cat: Audio/Audiobook, desc: "Hörspiel"} - {id: 38, cat: Audio/Audiobook, desc: "Audio Hörspiel"}
- {id: 6, cat: Audio, desc: "Musik"} - {id: 6, cat: Audio, desc: "Audio Musik"}
- {id: 82, cat: Audio, desc: "Tracks"} - {id: 82, cat: Audio, desc: "Audio Tracks"}
- {id: 29, cat: Audio/Video, desc: "Videos"} - {id: 29, cat: Audio/Video, desc: "Audio Videos"}
# Doku # Doku
- {id: 113, cat: TV/Documentary, desc: "3D"} - {id: 113, cat: TV/Documentary, desc: "Doku 3D"}
- {id: 76, cat: TV/Documentary, desc: "HD"} - {id: 76, cat: TV/Documentary, desc: "Doku HD"}
- {id: 78, cat: TV/Documentary, desc: "Packs"} - {id: 78, cat: TV/Documentary, desc: "Doku Packs"}
- {id: 75, cat: TV/Documentary, desc: "SD"} - {id: 75, cat: TV/Documentary, desc: "Doku SD"}
- {id: 114, cat: TV/Documentary, desc: "Sonstige"} - {id: 114, cat: TV/Documentary, desc: "Doku Sonstige"}
- {id: 77, cat: TV/Documentary, desc: "Untouched"} - {id: 77, cat: TV/Documentary, desc: "Doku Untouched"}
# Filme # Filme
- {id: 54, cat: Movies/HD, desc: "1080p"} - {id: 54, cat: Movies/HD, desc: "Filme 1080p"}
- {id: 5, cat: Movies/3D, desc: "3D"} - {id: 5, cat: Movies/3D, desc: "Filme 3D"}
- {id: 55, cat: Movies/HD, desc: "720p"} - {id: 55, cat: Movies/HD, desc: "Filme 720p"}
- {id: 111, cat: Movies, desc: "Anime"} - {id: 111, cat: Movies, desc: "Filme Anime"}
- {id: 43, cat: Movies/BluRay, desc: "BluRay"} - {id: 43, cat: Movies/BluRay, desc: "BluRay"}
- {id: 20, cat: Movies/DVD, desc: "DVDR"} - {id: 20, cat: Movies/DVD, desc: "Filme DVDR"}
- {id: 120, cat: Movies/Foreign, desc: "Int."} - {id: 120, cat: Movies/Foreign, desc: "Filme Int."}
- {id: 119, cat: Movies, desc: "Remux"} - {id: 119, cat: Movies, desc: "Filme Remux"}
- {id: 121, cat: Movies/HD, desc: "UHD"} - {id: 121, cat: Movies/HD, desc: "Filme UHD"}
- {id: 36, cat: Movies/HD, desc: "x264"} - {id: 124, cat: Movies/HD, desc: "Filme UHD Remux"}
- {id: 19, cat: Movies/SD, desc: "XviD"} - {id: 36, cat: Movies/HD, desc: "Filme SD"}
# Serien # Serien
- {id: 112, cat: TV/Anime, desc: "Anime"} - {id: 112, cat: TV/Anime, desc: "Serien Anime"}
- {id: 69, cat: TV/HD, desc: "HD"} - {id: 69, cat: TV/HD, desc: "Serien HD"}
- {id: 72, cat: TV/Foreign, desc: "Int."} - {id: 72, cat: TV/Foreign, desc: "Serien Int."}
- {id: 68, cat: TV, desc: "Packs"} - {id: 68, cat: TV, desc: "Serien Packs"}
- {id: 66, cat: TV/SD, desc: "SD"} - {id: 66, cat: TV/SD, desc: "Serien SD"}
- {id: 108, cat: TV, desc: "TV-Shows"} - {id: 108, cat: TV, desc: "Serien TV-Shows"}
# Sonstige # Sonstige
- {id: 117, cat: Other, desc: "Diverses"} - {id: 117, cat: Other, desc: "Sonstige Diverses"}
- {id: 28, cat: Books, desc: "eBooks"} - {id: 28, cat: Books, desc: "Sonstige eBooks"}
- {id: 42, cat: TV/Sport, desc: "Sport"} - {id: 42, cat: TV/Sport, desc: "Sonstige Sport"}
- {id: 103, cat: Other, desc: "Tutorials"} - {id: 103, cat: Other, desc: "Sonstige Tutorials"}
- {id: 9, cat: Other, desc: "Wallpaper"} - {id: 9, cat: Other, desc: "Sonstige Wallpaper"}
- {id: 64, cat: XXX, desc: "XXX"} - {id: 64, cat: XXX, desc: "Sonstige XXX"}
# Spiele # Spiele
- {id: 115, cat: PC/Mac, desc: "MAC"} - {id: 115, cat: PC/Mac, desc: "Spiele MAC"}
- {id: 37, cat: Console/NDS, desc: "Nintendo"} - {id: 37, cat: Console/NDS, desc: "Spiele Nintendo"}
- {id: 4, cat: PC/Games, desc: "PC"} - {id: 4, cat: PC/Games, desc: "Spiele PC"}
- {id: 58, cat: Console/PS4, desc: "PSX"} - {id: 58, cat: Console/PS4, desc: "Spiele PSX"}
- {id: 116, cat: Other, desc: "Sonstige"} - {id: 116, cat: Other, desc: "Spiele Sonstige"}
- {id: 50, cat: Console/Xbox, desc: "XBOX"} - {id: 50, cat: Console/Xbox, desc: "Spiele XBOX"}
modes: modes:
search: [q] search: [q]
tv-search: [q, season, ep] tv-search: [q, season, ep]
movie-search: [q]
settings: settings:
- name: pin - name: pin
@ -118,62 +112,103 @@
- path: browse.php - path: browse.php
inputs: inputs:
$raw: "{{range .Categories}}c{{.}}=1&{{end}}" $raw: "{{range .Categories}}c{{.}}=1&{{end}}"
search: "{{ .Query.Keywords }}" search: "{{ .Keywords }}"
incldead: "1" incldead: "1"
orderby: "added" orderby: "added"
sort: desc sort: "desc"
rows: rows:
selector: "h2 +p + br + table.tablebrowse > tbody > tr[style=\"height: 45px;\"], tr:contains(\"Weiter\") > td > table.tablebrowse > tbody > tr[style=\"height: 45px;\"]" selector: table.tableinborder:has(a[href^="download_ssl.php"])
fields: fields:
title: title:
selector: a[title][href^="details.php"] selector: a[title][href^="details.php"]
attribute: title attribute: title
category: category:
selector: a[href*="cat="] selector: td[style][colspan]
attribute: href case:
filters: td[style$="#000033;"]:contains("Android"): 65
- name: querystring td[style$="#000033;"]:contains("iOS"): 83
args: cat td[style$="#000033;"]:contains("Linux"): 107
td[style$="#000033;"]:contains("MAC"): 48
td[style$="#000033;"]:contains("Sonstige"): 109
td[style$="#000033;"]:contains("Win"): 22
td[style$="#1d2f8c;"]:contains("aBooks"): 24
td[style$="#1d2f8c;"]:contains("Disco's"): 104
td[style$="#1d2f8c;"]:contains("Hörspiel"): 38
td[style$="#1d2f8c;"]:contains("Musik"): 6
td[style$="#1d2f8c;"]:contains("Tracks"): 82
td[style$="#1d2f8c;"]:contains("Videos"): 29
td[style$="#000000;"]:contains("3D"): 113
td[style$="#000000;"]:contains("HD"): 76
td[style$="#000000;"]:contains("Packs"): 78
td[style$="#000000;"]:contains("SD"): 75
td[style$="#000000;"]:contains("Sonstige"): 114
td[style$="#000000;"]:contains("Untouched"): 77
td[style$="#55316e;"]:contains("1080p"): 54
td[style$="#55316e;"]:contains("3D"): 5
td[style$="#55316e;"]:contains("720p"): 55
td[style$="#55316e;"]:contains("Anime"): 111
td[style$="#55316e;"]:contains("BluRay"): 43
td[style$="#55316e;"]:contains("DVDR"): 20
td[style$="#55316e;"]:contains("Int"): 120
td[style$="#55316e;"]:contains("Remux"): 119
td[style$="#55316e;"]:contains("UHD"): 121
td[style$="#55316e;"]:contains("UHD Remux"): 124
td[style$="#55316e;"]:contains("SD"): 36
td[style$="#620000;"]:contains("Anime"): 112
td[style$="#620000;"]:contains("HD"): 69
td[style$="#620000;"]:contains("Int"): 72
td[style$="#620000;"]:contains("Packs"): 68
td[style$="#620000;"]:contains("SD"): 66
td[style$="#620000;"]:contains("TV-Shows"): 108
td[style$="#003300;"]:contains("Diverses"): 117
td[style$="#003300;"]:contains("eBooks"): 28
td[style$="#003300;"]:contains("Sport"): 42
td[style$="#003300;"]:contains("Tutorials"): 103
td[style$="#003300;"]:contains("Wallpaper"): 9
td[style$="#FF00FF;"]:contains("XXX"): 64
td[style$="#FF3300;"]:contains("MAC"): 115
td[style$="#FF3300;"]:contains("Nintendo"): 37
td[style$="#FF3300;"]:contains("PC"): 4
td[style$="#FF3300;"]:contains("PSX"): 58
td[style$="#FF3300;"]:contains("Sonstige"): 116
td[style$="#FF3300;"]:contains("XBOX"): 50
comments: comments:
selector: a[href*="&tocomm="] selector: a[href*="&tocomm="]
attribute: href attribute: href
download: download:
selector: a[href^="download_ssl.php"] selector: a[href^="download_ssl.php"]
attribute: href attribute: href
files:
selector: td:nth-child(3)
grabs: grabs:
selector: td:nth-child(9) selector: td:has(a[href*="&tosnatchers="])
filters: filters:
- name: replace - name: regexp
args: ["-mal", ""] args: "(\\d+) x"
size: size:
selector: td:nth-child(6) selector: td:has(a[href*="&filelist="])
filters: filters:
- name: regexp
args: "(.*?) in"
- name: replace - name: replace
args: [".", ""] args: [".", ""]
- name: replace - name: replace
args: [",", "."] args: [",", "."]
files:
selector: td:has(a[href*="&filelist="]) > b
seeders: seeders:
selector: td:nth-child(7) selector: td:has(a[href*="&toseeders="]) > font
filters:
- name: regexp
args: "(\\d+)"
leechers: leechers:
selector: td:nth-child(8) selector: td:has(a[href*="&todlers="]) > font
filters:
- name: regexp
args: "(\\d+)"
date: date:
selector: td:nth-child(5) selector: td:has(a[href*="&tocomm="]) ~ td
remove: br
filters: filters:
- name: re_replace
args: ["\\s", " "]
- name: dateparse - name: dateparse
args: "02.01.200615:04:05" args: "02.01.2006 15:04:05"
downloadvolumefactor: downloadvolumefactor:
case: case:
"font:contains(\"[OnlyUpload]\")": "0" img[src="pic/oupic.gif"]: "0"
"font:contains(\"[-40 Download]\")": "0.6" img[src="pic/-40.gif"]: "0.6"
"*": "1" "*": "1"
uploadvolumefactor: uploadvolumefactor:
case: case: