1
0
Fork 0
mirror of https://github.com/Jackett/Jackett synced 2025-03-10 14:14:25 +00:00

oldtoonsworld: change to unit3d. resolves #13707

https://github.com/Prowlarr/Prowlarr/issues/2056
This commit is contained in:
ilike2burnthing 2024-03-05 23:36:39 +00:00 committed by GitHub
parent db3edb45a6
commit 290c221359
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,7 +1,7 @@
---
id: oldtoonsworld
name: Old Toons World
description: "Old Toons World is a Private Torrent Tracker for Cartoon MOVIES / TV / GENERAL"
name: Oldtoons
description: "Oldtoons is a Private Torrent Tracker for Cartoon MOVIES / TV"
language: en-US
type: private
encoding: UTF-8
@ -10,38 +10,22 @@ links:
caps:
categorymappings:
- {id: 401, cat: TV/Anime, desc: "Anime"}
- {id: 404, cat: TV, desc: "Cartoon"}
- {id: 405, cat: Audio/Audiobook, desc: "AudioBooks"}
- {id: 402, cat: Books, desc: "Books"}
- {id: 403, cat: Movies, desc: "Shorts"}
- {id: 406, cat: TV, desc: "Adults"}
- {id: 407, cat: Movies, desc: "Family/Teen"}
- {id: 409, cat: Other, desc: "Misc"}
- {id: 408, cat: PC/Games, desc: "Games"}
- {id: 412, cat: Audio, desc: "Music"}
- {id: 1, cat: Movies, desc: "Movies"}
- {id: 1, cat: TV, desc: "TV"}
modes:
search: [q]
tv-search: [q, season, ep, imdbid]
movie-search: [q, imdbid]
music-search: [q]
book-search: [q]
tv-search: [q, season, ep, imdbid, tvdbid, tmdbid]
movie-search: [q, imdbid, tmdbid]
settings:
- name: username
- name: apikey
type: text
label: Username
- name: password
type: password
label: Password
- name: 2facode
type: text
label: 2FA code
- name: info_2fa
label: APIKey
- name: info_key
type: info
label: "About 2FA code"
default: "Only fill in the <b>2FA code</b> box if you have enabled <b>2FA</b> on the Old Toons World Web Site. Otherwise just leave it empty."
label: About your API key
default: "Find or Generate a new API Token by accessing your <a href=\"https://oldtoons.world/\" target=\"_blank\">Oldtoons</a> account <i>My Settings</i> page and clicking on the <b>API Key</b> tab."
- name: freeleech
type: checkbox
label: Search freeleech only
@ -49,12 +33,12 @@ settings:
- name: sort
type: select
label: Sort requested from site
default: 4
default: created_at
options:
4: created
7: seeders
5: size
1: title
created_at: created
seeders: seeders
size: size
name: title
- name: type
type: select
label: Order requested from site
@ -62,135 +46,109 @@ settings:
options:
desc: desc
asc: asc
- name: info_tpp
type: info
label: Results Per Page
default: For best results, change the <b>Torrents per page:</b> setting to <b>100</b> on your account profile.
login:
path: login.php
method: form
form: form[action="takelogin.php"]
captcha:
type: image
selector: img[alt="CAPTCHA"]
input: imagestring
inputs:
secret: ""
username: "{{ .Config.username }}"
password: "{{ .Config.password }}"
two_step_code: "{{ .Config.2facode }}"
logout: ""
securelogin: ""
ssl: yes
trackerssl: yes
path: /api/torrents
method: get
error:
- selector: td.embedded:has(h2:contains("Login failed!"))
- selector: td.embedded:has(h2:contains("Failed"))
- selector: td.embedded:has(h2:contains("Login Locked!"))
test:
path: index.php
selector: a[href="logout.php"]
- selector: a[href*="/login"]
message:
text: "The API key was not accepted by {{ .Config.sitelink }}."
search:
paths:
- path: torrents.php
# https://github.com/HDInnovations/UNIT3D-Community-Edition/wiki/Torrent-API-(UNIT3D-v7.0.0)
# https://github.com/HDInnovations/UNIT3D-Community-Edition/blob/master/app/Http/Controllers/API/TorrentController.php#L349
- path: "/api/torrents/filter"
response:
type: json
headers:
Authorization: ["Bearer {{ .Config.apikey }}"]
inputs:
$raw: "{{ range .Categories }}cat{{.}}=1&{{end}}"
search: "{{ if .Query.IMDBID }}{{ .Query.IMDBID }}{{ else }}{{ .Keywords }}{{ end }}"
# 0 incldead, 1 active, 2 dead
incldead: 0
# 0 all, 1 normal, 2 free, 3 2x, 4 2xfree, 5 50%, 6 2x50%, 7 30%
spstate: "{{ if .Config.freeleech }}2{{ else }}0{{ end }}"
# 0 title, 1 descr, 3 uploader, 4 imdburl
search_area: "{{ if .Query.IMDBID }}4{{ else }}0{{ end }}"
# 0 AND, 1 OR, 2 exact
search_mode: 0
sort: "{{ .Config.sort }}"
type: "{{ .Config.type }}"
notnewword: 1
# if we have an id based search, add Season and Episode as query in name for UNIT3D < v6. Else pass S/E Params for UNIT3D >= v6
$raw: "{{ range .Categories }}&categories[]={{.}}{{end}}"
name: "{{ .Keywords }}"
seasonNumber: "{{ .Query.Season }}"
episodeNumber: "{{ .Query.Ep }}"
imdbId: "{{ .Query.IMDBIDShort }}"
tmdbId: "{{ .Query.TMDBID }}"
tvdbId: "{{ .Query.TVDBID }}"
"free[]": "{{ if .Config.freeleech }}100{{ else }}{{ end }}"
sortField: "{{ .Config.sort }}"
sortDirection: "{{ .Config.type }}"
perPage: 100
keywordsfilters:
- name: re_replace
args: ["\\.", " "]
rows:
selector: table.torrents > tbody > tr:has(a[href^="details.php?id="])
selector: data
attribute: attributes
fields:
category:
selector: a[href^="?cat="]
attribute: href
filters:
- name: querystring
args: cat
title_default:
selector: a[href^="details.php?id="]
selector: category_id
title:
selector: a[title][href^="details.php?id="]
attribute: title
optional: true
default: "{{ .Result.title_default }}"
selector: name
details:
selector: a[href^="details.php?id="]
attribute: href
selector: details_link
download:
selector: a[href^="download.php?id="]
attribute: href
selector: download_link
infohash:
selector: info_hash
poster:
selector: img[data-src]
attribute: data-src
selector: meta.poster
filters:
- name: replace
args: ["https://via.placeholder.com/90x135", ""]
imdbid:
# site currently only has a badge and rating, the id is not present. just in case a future update.
selector: a[href*="imdb.com/title/tt"]
attribute: href
date_elapsed:
# time type: time elapsed (default)
selector: td.rowfollow:nth-child(4) > span[title]
attribute: title
optional: true
filters:
- name: append
args: " +00:00" # GMT
- name: dateparse
args: "yyyy-MM-dd HH:mm:ss zzz"
date_added:
# time added
selector: td.rowfollow:nth-child(4):not(:has(span))
optional: true
filters:
- name: append
args: " +00:00" # GMT
- 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.rowfollow:nth-child(5)
seeders:
selector: td.rowfollow:nth-child(6)
leechers:
selector: td.rowfollow:nth-child(7)
grabs:
selector: td.rowfollow:nth-child(8)
downloadvolumefactor:
case:
img.pro_free: 0
img.pro_free2up: 0
img.pro_50pctdown: 0.5
img.pro_50pctdown2up: 0.5
img.pro_30pctdown: 0.3
"*": 1
uploadvolumefactor:
case:
img.pro_50pctdown2up: 2
img.pro_free2up: 2
img.pro_2up: 2
"*": 1
minimumratio:
text: 1.0
minimumseedtime:
# 2 day (as seconds = 2 x 24 x 60 x 60)
text: 172800
selector: imdb_id
tmdbid:
selector: tmdb_id
tvdbid:
selector: tvdb_id
genre:
selector: td.rowfollow:nth-child(2)
remove: a, img, span
selector: meta.genres
filters:
- name: re_replace
args: ["(?i)^None$", ""]
description:
text: "{{ .Result.genre }}"
# NexusPHP v1.8.6 2023-08-18
files:
selector: num_file
seeders:
selector: seeders
leechers:
selector: leechers
grabs:
selector: times_completed
date:
# "created_at": "2021-10-18T00:34:50.000000Z" is returned by Newtonsoft.Json.Linq as 18/10/2021 00:34:50
selector: created_at
filters:
- name: append
args: " +00:00" # GMT
- name: dateparse
args: "MM/dd/yyyy HH:mm:ss zzz"
size:
selector: size
downloadvolumefactor:
# api returns 0%, 25%, 50%, 75%, 100%
selector: freeleech
case:
0%: 1 # not free
25%: 0.75
50%: 0.5
75%: 0.25
100%: 0 # freeleech
"*": 0 # catch errors
uploadvolumefactor:
# api returns False, True
selector: double_upload
case:
False: 1 # normal
True: 2 # double
# json UNIT3D 7.2.5