mirror of
https://github.com/Jackett/Jackett
synced 2025-03-10 22:23:20 +00:00
oldtoonsworld: change to unit3d. resolves #13707
https://github.com/Prowlarr/Prowlarr/issues/2056
This commit is contained in:
parent
db3edb45a6
commit
290c221359
1 changed files with 102 additions and 144 deletions
|
@ -1,7 +1,7 @@
|
||||||
---
|
---
|
||||||
id: oldtoonsworld
|
id: oldtoonsworld
|
||||||
name: Old Toons World
|
name: Oldtoons
|
||||||
description: "Old Toons World is a Private Torrent Tracker for Cartoon MOVIES / TV / GENERAL"
|
description: "Oldtoons is a Private Torrent Tracker for Cartoon MOVIES / TV"
|
||||||
language: en-US
|
language: en-US
|
||||||
type: private
|
type: private
|
||||||
encoding: UTF-8
|
encoding: UTF-8
|
||||||
|
@ -10,38 +10,22 @@ links:
|
||||||
|
|
||||||
caps:
|
caps:
|
||||||
categorymappings:
|
categorymappings:
|
||||||
- {id: 401, cat: TV/Anime, desc: "Anime"}
|
- {id: 1, cat: Movies, desc: "Movies"}
|
||||||
- {id: 404, cat: TV, desc: "Cartoon"}
|
- {id: 1, cat: TV, desc: "TV"}
|
||||||
- {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"}
|
|
||||||
|
|
||||||
modes:
|
modes:
|
||||||
search: [q]
|
search: [q]
|
||||||
tv-search: [q, season, ep, imdbid]
|
tv-search: [q, season, ep, imdbid, tvdbid, tmdbid]
|
||||||
movie-search: [q, imdbid]
|
movie-search: [q, imdbid, tmdbid]
|
||||||
music-search: [q]
|
|
||||||
book-search: [q]
|
|
||||||
|
|
||||||
settings:
|
settings:
|
||||||
- name: username
|
- name: apikey
|
||||||
type: text
|
type: text
|
||||||
label: Username
|
label: APIKey
|
||||||
- name: password
|
- name: info_key
|
||||||
type: password
|
|
||||||
label: Password
|
|
||||||
- name: 2facode
|
|
||||||
type: text
|
|
||||||
label: 2FA code
|
|
||||||
- name: info_2fa
|
|
||||||
type: info
|
type: info
|
||||||
label: "About 2FA code"
|
label: About your API key
|
||||||
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."
|
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
|
- name: freeleech
|
||||||
type: checkbox
|
type: checkbox
|
||||||
label: Search freeleech only
|
label: Search freeleech only
|
||||||
|
@ -49,12 +33,12 @@ settings:
|
||||||
- name: sort
|
- name: sort
|
||||||
type: select
|
type: select
|
||||||
label: Sort requested from site
|
label: Sort requested from site
|
||||||
default: 4
|
default: created_at
|
||||||
options:
|
options:
|
||||||
4: created
|
created_at: created
|
||||||
7: seeders
|
seeders: seeders
|
||||||
5: size
|
size: size
|
||||||
1: title
|
name: title
|
||||||
- name: type
|
- name: type
|
||||||
type: select
|
type: select
|
||||||
label: Order requested from site
|
label: Order requested from site
|
||||||
|
@ -62,135 +46,109 @@ settings:
|
||||||
options:
|
options:
|
||||||
desc: desc
|
desc: desc
|
||||||
asc: asc
|
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:
|
login:
|
||||||
path: login.php
|
path: /api/torrents
|
||||||
method: form
|
method: get
|
||||||
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
|
|
||||||
error:
|
error:
|
||||||
- selector: td.embedded:has(h2:contains("Login failed!"))
|
- selector: a[href*="/login"]
|
||||||
- selector: td.embedded:has(h2:contains("Failed"))
|
message:
|
||||||
- selector: td.embedded:has(h2:contains("Login Locked!"))
|
text: "The API key was not accepted by {{ .Config.sitelink }}."
|
||||||
test:
|
|
||||||
path: index.php
|
|
||||||
selector: a[href="logout.php"]
|
|
||||||
|
|
||||||
search:
|
search:
|
||||||
paths:
|
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:
|
inputs:
|
||||||
$raw: "{{ range .Categories }}cat{{.}}=1&{{end}}"
|
# 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
|
||||||
search: "{{ if .Query.IMDBID }}{{ .Query.IMDBID }}{{ else }}{{ .Keywords }}{{ end }}"
|
$raw: "{{ range .Categories }}&categories[]={{.}}{{end}}"
|
||||||
# 0 incldead, 1 active, 2 dead
|
name: "{{ .Keywords }}"
|
||||||
incldead: 0
|
seasonNumber: "{{ .Query.Season }}"
|
||||||
# 0 all, 1 normal, 2 free, 3 2x, 4 2xfree, 5 50%, 6 2x50%, 7 30%
|
episodeNumber: "{{ .Query.Ep }}"
|
||||||
spstate: "{{ if .Config.freeleech }}2{{ else }}0{{ end }}"
|
imdbId: "{{ .Query.IMDBIDShort }}"
|
||||||
# 0 title, 1 descr, 3 uploader, 4 imdburl
|
tmdbId: "{{ .Query.TMDBID }}"
|
||||||
search_area: "{{ if .Query.IMDBID }}4{{ else }}0{{ end }}"
|
tvdbId: "{{ .Query.TVDBID }}"
|
||||||
# 0 AND, 1 OR, 2 exact
|
"free[]": "{{ if .Config.freeleech }}100{{ else }}{{ end }}"
|
||||||
search_mode: 0
|
sortField: "{{ .Config.sort }}"
|
||||||
sort: "{{ .Config.sort }}"
|
sortDirection: "{{ .Config.type }}"
|
||||||
type: "{{ .Config.type }}"
|
perPage: 100
|
||||||
notnewword: 1
|
|
||||||
|
keywordsfilters:
|
||||||
|
- name: re_replace
|
||||||
|
args: ["\\.", " "]
|
||||||
|
|
||||||
rows:
|
rows:
|
||||||
selector: table.torrents > tbody > tr:has(a[href^="details.php?id="])
|
selector: data
|
||||||
|
attribute: attributes
|
||||||
|
|
||||||
fields:
|
fields:
|
||||||
category:
|
category:
|
||||||
selector: a[href^="?cat="]
|
selector: category_id
|
||||||
attribute: href
|
|
||||||
filters:
|
|
||||||
- name: querystring
|
|
||||||
args: cat
|
|
||||||
title_default:
|
|
||||||
selector: a[href^="details.php?id="]
|
|
||||||
title:
|
title:
|
||||||
selector: a[title][href^="details.php?id="]
|
selector: name
|
||||||
attribute: title
|
|
||||||
optional: true
|
|
||||||
default: "{{ .Result.title_default }}"
|
|
||||||
details:
|
details:
|
||||||
selector: a[href^="details.php?id="]
|
selector: details_link
|
||||||
attribute: href
|
|
||||||
download:
|
download:
|
||||||
selector: a[href^="download.php?id="]
|
selector: download_link
|
||||||
attribute: href
|
infohash:
|
||||||
|
selector: info_hash
|
||||||
poster:
|
poster:
|
||||||
selector: img[data-src]
|
selector: meta.poster
|
||||||
attribute: data-src
|
filters:
|
||||||
|
- name: replace
|
||||||
|
args: ["https://via.placeholder.com/90x135", ""]
|
||||||
imdbid:
|
imdbid:
|
||||||
# site currently only has a badge and rating, the id is not present. just in case a future update.
|
selector: imdb_id
|
||||||
selector: a[href*="imdb.com/title/tt"]
|
tmdbid:
|
||||||
attribute: href
|
selector: tmdb_id
|
||||||
date_elapsed:
|
tvdbid:
|
||||||
# time type: time elapsed (default)
|
selector: tvdb_id
|
||||||
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
|
|
||||||
genre:
|
genre:
|
||||||
selector: td.rowfollow:nth-child(2)
|
selector: meta.genres
|
||||||
remove: a, img, span
|
filters:
|
||||||
|
- name: re_replace
|
||||||
|
args: ["(?i)^None$", ""]
|
||||||
description:
|
description:
|
||||||
text: "{{ .Result.genre }}"
|
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
|
||||||
|
|
Loading…
Add table
Reference in a new issue