mirror of
https://github.com/Jackett/Jackett.git
synced 2025-12-14 03:11:59 +01:00
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1657f12bed | ||
|
|
4038a0d430 | ||
|
|
a8a8701ab0 | ||
|
|
52d432be52 | ||
|
|
0518d30f9d | ||
|
|
c66e4be3b7 | ||
|
|
82931b31cf | ||
|
|
1bc41f396e | ||
|
|
6b4ff3a368 |
@@ -70,6 +70,7 @@ Prior versions of Jackett are no longer supported.
|
||||
* Frozen Layer
|
||||
* GamesTorrents
|
||||
* GTorrent.pro
|
||||
* HDRTorrent
|
||||
* Idope
|
||||
* ilCorSaRoNeRo
|
||||
* Internet Archive (archive.org)
|
||||
@@ -389,6 +390,7 @@ Prior versions of Jackett are no longer supported.
|
||||
* HDU
|
||||
* Hebits (HB)
|
||||
* HellasHut
|
||||
* HELLENIC-HD
|
||||
* HHanClub
|
||||
* HHD
|
||||
* HomePornTorrents (HPT)
|
||||
@@ -527,7 +529,7 @@ Prior versions of Jackett are no longer supported.
|
||||
* ShaKaw [![(invite needed)][inviteneeded]](#)
|
||||
* Shareisland
|
||||
* Shazbat
|
||||
* SiamBIT
|
||||
* SiamBIT [PAY2DL]
|
||||
* SkipTheCommercials
|
||||
* SnowPT (SSPT)
|
||||
* SoulVoice (聆音Club) [![(invite needed)][inviteneeded]](#)
|
||||
|
||||
@@ -15,13 +15,13 @@ legacylinks:
|
||||
|
||||
caps:
|
||||
categorymappings:
|
||||
- {id: 10, cat: Audio/Audiobook, desc: "Action/Adventure"}
|
||||
- {id: 80, cat: Audio/Audiobook, desc: "Adult/Erotica"}
|
||||
- {id: 20, cat: Audio/Audiobook, desc: "Biography/Memoirs"}
|
||||
- {id: 10, cat: Audio/Audiobook, desc: "Action & Adventure"}
|
||||
- {id: 80, cat: Audio/Audiobook, desc: "Adult & Erotica"}
|
||||
- {id: 20, cat: Audio/Audiobook, desc: "Biography & Memoirs"}
|
||||
- {id: 30, cat: Audio/Audiobook, desc: "Business"}
|
||||
- {id: 40, cat: Audio/Audiobook, desc: "Childrens"}
|
||||
- {id: 70, cat: Audio/Audiobook, desc: "Computers"}
|
||||
- {id: 260, cat: Audio/Audiobook, desc: "Crime/Thriller"}
|
||||
- {id: 260, cat: Audio/Audiobook, desc: "Crime & Thriller"}
|
||||
- {id: 90, cat: Audio/Audiobook, desc: "Fantasy-General"}
|
||||
- {id: 100, cat: Audio/Audiobook, desc: "Fantasy-Youth"}
|
||||
- {id: 130, cat: Audio/Audiobook, desc: "General Fiction"}
|
||||
@@ -32,54 +32,52 @@ caps:
|
||||
- {id: 170, cat: Audio/Audiobook, desc: "Literature"}
|
||||
- {id: 175, cat: Audio/Audiobook, desc: "LitRPG"}
|
||||
- {id: 180, cat: Audio/Audiobook, desc: "Mystery"}
|
||||
- {id: 190, cat: Audio/Audiobook, desc: "Non-Fiction"}
|
||||
- {id: 215, cat: Audio/Audiobook, desc: "Paranormal Romance"}
|
||||
- {id: 200, cat: Audio/Audiobook, desc: "Radio Drama"}
|
||||
- {id: 205, cat: Audio/Audiobook, desc: "Reference/Educational"}
|
||||
- {id: 205, cat: Audio/Audiobook, desc: "Reference & Educational"}
|
||||
- {id: 207, cat: Audio/Audiobook, desc: "Religion and Spirituality"}
|
||||
- {id: 210, cat: Audio/Audiobook, desc: "Romance"}
|
||||
- {id: 240, cat: Audio/Audiobook, desc: "Sci-Fi Apocalypse"}
|
||||
- {id: 220, cat: Audio/Audiobook, desc: "Science"}
|
||||
- {id: 230, cat: Audio/Audiobook, desc: "Science Fiction"}
|
||||
- {id: 250, cat: Audio/Audiobook, desc: "Self Improvement"}
|
||||
- {id: 265, cat: Audio/Audiobook, desc: "Sports/Fitness"}
|
||||
- {id: 265, cat: Audio/Audiobook, desc: "Sports & Fitness"}
|
||||
- {id: 270, cat: Audio/Audiobook, desc: "Suspense"}
|
||||
- {id: 280, cat: Audio/Audiobook, desc: "Talk Radio"}
|
||||
- {id: 285, cat: Audio/Audiobook, desc: "Travel"}
|
||||
- {id: 290, cat: Audio/Audiobook, desc: "Urban Fantasy/Paranormal"}
|
||||
- {id: 290, cat: Audio/Audiobook, desc: "Urban Fantasy & Paranormal"}
|
||||
- {id: 300, cat: Audio/Audiobook, desc: "Western"}
|
||||
- {id: 310, cat: Audio/Audiobook, desc: "Young Adult"}
|
||||
- {id: 400, cat: Books/EBook, desc: "[E] Action/Adventure"}
|
||||
- {id: 410, cat: Books/EBook, desc: "[E] Adult/Erotica"}
|
||||
- {id: 400, cat: Books/EBook, desc: "[E] Action & Adventure"}
|
||||
- {id: 410, cat: Books/EBook, desc: "[E] Adult & Erotica"}
|
||||
- {id: 420, cat: Books/EBook, desc: "[E] Arts & Crafts (Hobbies)"}
|
||||
- {id: 430, cat: Books/EBook, desc: "[E] Biography/Memoirs"}
|
||||
- {id: 430, cat: Books/EBook, desc: "[E] Biography & Memoirs"}
|
||||
- {id: 435, cat: Books/EBook, desc: "[E] Business"}
|
||||
- {id: 450, cat: Books/EBook, desc: "[E] Computer Learning"}
|
||||
- {id: 460, cat: Books/EBook, desc: "[E] Cookery"}
|
||||
- {id: 470, cat: Books/EBook, desc: "[E] Crime/Thriller"}
|
||||
- {id: 470, cat: Books/EBook, desc: "[E] Crime & Thriller"}
|
||||
- {id: 480, cat: Books/EBook, desc: "[E] Fantasy"}
|
||||
- {id: 490, cat: Books/EBook, desc: "[E] Fantasy-Youth"}
|
||||
- {id: 500, cat: Books/EBook, desc: "[E] General Fiction"}
|
||||
- {id: 510, cat: Books/EBook, desc: "[E] Historical Fiction"}
|
||||
- {id: 520, cat: Books/EBook, desc: "[E] History/Documentary"}
|
||||
- {id: 520, cat: Books/EBook, desc: "[E] History & Documentary"}
|
||||
- {id: 530, cat: Books/EBook, desc: "[E] Horror"}
|
||||
- {id: 540, cat: Books/EBook, desc: "[E] Humor (Comedy)"}
|
||||
- {id: 560, cat: Books/EBook, desc: "[E] Literary Fiction"}
|
||||
- {id: 565, cat: Books/EBook, desc: "[E] LitRPG"}
|
||||
- {id: 570, cat: Books/EBook, desc: "[E] Mystery"}
|
||||
- {id: 580, cat: Books/EBook, desc: "[E] Non-Fiction"}
|
||||
- {id: 590, cat: Books/EBook, desc: "[E] Paranormal Romance"}
|
||||
- {id: 600, cat: Books/EBook, desc: "[E] Reference/Educational"}
|
||||
- {id: 610, cat: Books/EBook, desc: "[E] Religion and Spirituality"}
|
||||
- {id: 600, cat: Books/EBook, desc: "[E] Reference & Educational"}
|
||||
- {id: 610, cat: Books/EBook, desc: "[E] Religion & Spirituality"}
|
||||
- {id: 620, cat: Books/EBook, desc: "[E] Romance"}
|
||||
- {id: 630, cat: Books/EBook, desc: "[E] Sci-Fi"}
|
||||
- {id: 640, cat: Books/EBook, desc: "[E] Sci-Fi/Apocalyptic"}
|
||||
- {id: 640, cat: Books/EBook, desc: "[E] Sci-Fi & Apocalyptic"}
|
||||
- {id: 645, cat: Books/EBook, desc: "[E] Science"}
|
||||
- {id: 650, cat: Books/EBook, desc: "[E] Self-Help"}
|
||||
- {id: 660, cat: Books/EBook, desc: "[E] Sports/Fitness"}
|
||||
- {id: 660, cat: Books/EBook, desc: "[E] Sports & Fitness"}
|
||||
- {id: 665, cat: Books/EBook, desc: "[E] Suspense"}
|
||||
- {id: 670, cat: Books/EBook, desc: "[E] Travel"}
|
||||
- {id: 690, cat: Books/EBook, desc: "[E] Urban Fantasy/Paranormal"}
|
||||
- {id: 690, cat: Books/EBook, desc: "[E] Urban Fantasy & Paranormal"}
|
||||
- {id: 700, cat: Books/EBook, desc: "[E] Western"}
|
||||
- {id: 710, cat: Books/EBook, desc: "[E] Young Adult"}
|
||||
- {id: 720, cat: Books/EBook, desc: "[E] Young Children"}
|
||||
@@ -134,7 +132,7 @@ search:
|
||||
|
||||
fields: # some users (rank specific?) have an extra column (td:nth-child(4)) with bookmark features
|
||||
categorydesc:
|
||||
selector: div[data-tid] > img
|
||||
selector: img[src^="./pic/caticons"]
|
||||
attribute: alt
|
||||
title:
|
||||
selector: a[href^="details.php?id="]
|
||||
|
||||
190
src/Jackett.Common/Definitions/hellenic-hd-api.yml
Normal file
190
src/Jackett.Common/Definitions/hellenic-hd-api.yml
Normal file
@@ -0,0 +1,190 @@
|
||||
---
|
||||
id: hellenic-hd-api
|
||||
name: HELLENIC-HD (API)
|
||||
description: "HELLENIC-HD is a GREEK Private Torrent Tracker for MOVIES / TV"
|
||||
language: el-GR
|
||||
type: private
|
||||
encoding: UTF-8
|
||||
links:
|
||||
- https://hellenic-hd.cc/
|
||||
|
||||
caps:
|
||||
categorymappings:
|
||||
- {id: 1, cat: Movies, desc: "Movies"}
|
||||
- {id: 2, cat: TV, desc: "TV"}
|
||||
|
||||
modes:
|
||||
search: [q]
|
||||
tv-search: [q, season, ep, imdbid, tvdbid, tmdbid]
|
||||
movie-search: [q, imdbid, tmdbid]
|
||||
|
||||
settings:
|
||||
- name: apikey
|
||||
type: text
|
||||
label: APIKey
|
||||
- name: info_key
|
||||
type: info
|
||||
label: About your API key
|
||||
default: "Find or Generate a new API Token by accessing your <a href=\"https://hellenic-hd.cc/\" target=\"_blank\">HELLENIC-HD</a> account <i>My Settings</i> page and clicking on the <b>API Key</b> tab."
|
||||
- name: freeleech
|
||||
type: checkbox
|
||||
label: Search freeleech only
|
||||
default: false
|
||||
- name: single_file_release_use_filename
|
||||
type: checkbox
|
||||
label: Use filename as title for single file releases
|
||||
default: true
|
||||
- name: sort
|
||||
type: select
|
||||
label: Sort requested from site
|
||||
default: created_at
|
||||
options:
|
||||
created_at: created
|
||||
seeders: seeders
|
||||
size: size
|
||||
name: title
|
||||
- name: type
|
||||
type: select
|
||||
label: Order requested from site
|
||||
default: desc
|
||||
options:
|
||||
desc: desc
|
||||
asc: asc
|
||||
- name: info_activity
|
||||
type: info
|
||||
label: Account Inactivity
|
||||
default: "Accounts that have not logged in for 60 days will be disabled, and may be deleted shortly afterwards."
|
||||
|
||||
login:
|
||||
path: /api/torrents
|
||||
method: get
|
||||
error:
|
||||
- selector: a[href*="/login"]
|
||||
message:
|
||||
text: "The API key was not accepted by {{ .Config.sitelink }}."
|
||||
- selector: :root:contains("Account is Banned")
|
||||
|
||||
search:
|
||||
paths:
|
||||
# https://hdinnovations.github.io/UNIT3D/torrent_api.html
|
||||
# https://github.com/HDInnovations/UNIT3D/blob/master/app/Http/Controllers/API/TorrentController.php#L657
|
||||
- path: api/torrents/filter
|
||||
response:
|
||||
type: json
|
||||
|
||||
headers:
|
||||
Authorization: ["Bearer {{ .Config.apikey }}"]
|
||||
|
||||
inputs:
|
||||
# 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: data
|
||||
attribute: attributes
|
||||
|
||||
fields:
|
||||
category:
|
||||
selector: category_id
|
||||
title_optional:
|
||||
selector: name
|
||||
title_filename:
|
||||
selector: "files[0].name"
|
||||
optional: true
|
||||
files:
|
||||
selector: num_file
|
||||
title:
|
||||
text: "{{ if and (.Config.single_file_release_use_filename) (eq .Result.files \"1\") (.Result.title_filename) }}{{ .Result.title_filename }}{{ else }}{{ .Result.title_optional }}{{ end }}"
|
||||
details:
|
||||
selector: details_link
|
||||
download:
|
||||
selector: download_link
|
||||
poster:
|
||||
selector: meta.poster
|
||||
filters:
|
||||
- name: replace
|
||||
args: ["https://via.placeholder.com/90x135", ""]
|
||||
imdbid:
|
||||
selector: imdb_id
|
||||
tmdbid:
|
||||
selector: tmdb_id
|
||||
tvdbid:
|
||||
selector: tvdb_id
|
||||
genre:
|
||||
selector: meta.genres
|
||||
filters:
|
||||
- name: re_replace
|
||||
args: ["(?i)(Science Fiction)", "Science_Fiction"]
|
||||
- name: re_replace
|
||||
args: ["(?i)(TV Movie)", "TV_Movie"]
|
||||
- name: replace
|
||||
args: [" & ", "_&_"]
|
||||
_internal:
|
||||
selector: internal
|
||||
case:
|
||||
False: "{{ .False }}"
|
||||
True: "{{ .True }}"
|
||||
description:
|
||||
text: "{{ if .Result._internal }}Internal{{ else }}{{ end }}{{ if and .Result._internal .Result.genre }} | {{ else }}{{ end }}{{ .Result.genre }}"
|
||||
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
|
||||
_featured:
|
||||
selector: featured
|
||||
case:
|
||||
False: "{{ .False }}"
|
||||
True: "{{ .True }}"
|
||||
downloadvolumefactor_freeleech:
|
||||
# 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
|
||||
downloadvolumefactor:
|
||||
text: "{{ if .Result._featured }}0{{ else }}{{ .Result.downloadvolumefactor_freeleech }}{{ end }}"
|
||||
uploadvolumefactor_double_upload:
|
||||
# api returns False, True
|
||||
selector: double_upload
|
||||
case:
|
||||
False: 1 # normal
|
||||
True: 2 # double
|
||||
uploadvolumefactor:
|
||||
text: "{{ if .Result._featured }}2{{ else }}{{ .Result.uploadvolumefactor_double_upload }}{{ end }}"
|
||||
# global MR is 0.4 but torrents must be seeded for 14 days regardless of ratio
|
||||
# minimumratio:
|
||||
# text: 0.4
|
||||
minimumseedtime:
|
||||
# 14 days (as seconds = 14 x 24 x 60 x 60)
|
||||
text: 1209600
|
||||
# json UNIT3D 9.1.6
|
||||
@@ -9,12 +9,8 @@ type: semi-private
|
||||
encoding: windows-1251
|
||||
followredirect: true
|
||||
links:
|
||||
- https://oct25.rudub.homes/
|
||||
- https://oct27.rudub.homes/
|
||||
legacylinks:
|
||||
- https://oct10.rudub.mom/
|
||||
- http://oct11.rudub.mom/
|
||||
- https://oct11.rudub.mom/
|
||||
- http://oct12.rudub.mom/
|
||||
- https://oct12.rudub.mom/
|
||||
- http://oct13.rudub.mom/
|
||||
- https://oct13.rudub.mom/
|
||||
@@ -41,6 +37,10 @@ legacylinks:
|
||||
- http://oct24.rudub.homes/
|
||||
- https://oct24.rudub.homes/
|
||||
- http://oct25.rudub.homes/
|
||||
- https://oct25.rudub.homes/
|
||||
- http://oct26.rudub.homes/
|
||||
- https://oct26.rudub.homes/
|
||||
- http://oct27.rudub.homes/
|
||||
caps:
|
||||
categorymappings:
|
||||
- {id: 1, cat: TV, desc: "TV"}
|
||||
|
||||
@@ -17,11 +17,10 @@ caps:
|
||||
- {id: 2, cat: TV, desc: "Serie TV"}
|
||||
- {id: 15, cat: Books/EBook, desc: "Ebook"}
|
||||
- {id: 17, cat: Books/Mags, desc: "Riviste e Giornali"}
|
||||
- {id: 19, cat: XXX, desc: "XXX"}
|
||||
- {id: 3, cat: Audio, desc: "Music"}
|
||||
- {id: 7, cat: PC/Games, desc: "Games"}
|
||||
- {id: 23, cat: PC, desc: "Software"}
|
||||
- {id: 24, cat: TV/Sport, desc: "EVENTI SPORTIVI"}
|
||||
- {id: 24, cat: TV/Sport, desc: "Eventi Sportivi"}
|
||||
- {id: 25, cat: Other, desc: "Misc"}
|
||||
|
||||
modes:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
id: siambit
|
||||
name: SiamBIT
|
||||
description: "SiamBIT is a THAI Private Torrent Tracker for GENERAL"
|
||||
description: "SiamBIT is a THAI PAY2DL Private Torrent Tracker for GENERAL"
|
||||
language: th-TH
|
||||
type: private
|
||||
encoding: tis-620
|
||||
@@ -148,8 +148,7 @@ search:
|
||||
|
||||
fields:
|
||||
category:
|
||||
# the last selector is temporary as the site has apparently not yet updated their html for the cat links ;-)
|
||||
selector: a[href^="viewno18sbx.php?cat="], a[href^="viewbrsb.php?cat="], a[href^="viewno18sb.php?cat="]
|
||||
selector: a[href*=".php?cat="]
|
||||
attribute: href
|
||||
filters:
|
||||
- name: querystring
|
||||
@@ -162,59 +161,62 @@ search:
|
||||
download:
|
||||
selector: a[href^="details.php?id="]
|
||||
attribute: href
|
||||
poster:
|
||||
selector: img[alt="Poster"]
|
||||
attribute: src
|
||||
imdbid:
|
||||
selector: a[href*="imdb.com/title/tt"]
|
||||
attribute: href
|
||||
files:
|
||||
selector: td:nth-child(5)
|
||||
selector: td:nth-child(6)
|
||||
date:
|
||||
selector: td:nth-child(7)
|
||||
selector: td:nth-child(8)
|
||||
filters:
|
||||
- name: append
|
||||
args: " +07:00" # ICT
|
||||
- name: dateparse
|
||||
args: "dd-MM-yyyyHH:mm:ss zzz"
|
||||
size:
|
||||
selector: td:nth-child(8)
|
||||
grabs:
|
||||
selector: td:nth-child(9)
|
||||
seeders:
|
||||
grabs:
|
||||
selector: td:nth-child(10)
|
||||
leechers:
|
||||
seeders:
|
||||
selector: td:nth-child(11)
|
||||
leechers:
|
||||
selector: td:nth-child(12)
|
||||
downloadvolumefactor:
|
||||
case:
|
||||
"td:nth-child(3):contains(\"100%\")": 0
|
||||
"td:nth-child(3):contains(\"95%\")": 0.05
|
||||
"td:nth-child(3):contains(\"90%\")": 0.1
|
||||
"td:nth-child(3):contains(\"85%\")": 0.15
|
||||
"td:nth-child(3):contains(\"80%\")": 0.2
|
||||
"td:nth-child(3):contains(\"75%\")": 0.25
|
||||
"td:nth-child(3):contains(\"70%\")": 0.3
|
||||
"td:nth-child(3):contains(\"65%\")": 0.35
|
||||
"td:nth-child(3):contains(\"60%\")": 0.4
|
||||
"td:nth-child(3):contains(\"55%\")": 0.45
|
||||
"td:nth-child(3):contains(\"50%\")": 0.5
|
||||
"td:nth-child(3):contains(\"45%\")": 0.55
|
||||
"td:nth-child(3):contains(\"40%\")": 0.6
|
||||
"td:nth-child(3):contains(\"35%\")": 0.65
|
||||
"td:nth-child(3):contains(\"30%\")": 0.7
|
||||
"td:nth-child(3):contains(\"25%\")": 0.75
|
||||
"td:nth-child(3):contains(\"20%\")": 0.8
|
||||
"td:nth-child(3):contains(\"15%\")": 0.85
|
||||
"td:nth-child(3):contains(\"10%\")": 0.9
|
||||
"td:nth-child(3):contains(\"5%\")": 0.95
|
||||
"td:nth-child(4):contains(\"100%\")": 0
|
||||
"td:nth-child(4):contains(\"95%\")": 0.05
|
||||
"td:nth-child(4):contains(\"90%\")": 0.1
|
||||
"td:nth-child(4):contains(\"85%\")": 0.15
|
||||
"td:nth-child(4):contains(\"80%\")": 0.2
|
||||
"td:nth-child(4):contains(\"75%\")": 0.25
|
||||
"td:nth-child(4):contains(\"70%\")": 0.3
|
||||
"td:nth-child(4):contains(\"65%\")": 0.35
|
||||
"td:nth-child(4):contains(\"60%\")": 0.4
|
||||
"td:nth-child(4):contains(\"55%\")": 0.45
|
||||
"td:nth-child(4):contains(\"50%\")": 0.5
|
||||
"td:nth-child(4):contains(\"45%\")": 0.55
|
||||
"td:nth-child(4):contains(\"40%\")": 0.6
|
||||
"td:nth-child(4):contains(\"35%\")": 0.65
|
||||
"td:nth-child(4):contains(\"30%\")": 0.7
|
||||
"td:nth-child(4):contains(\"25%\")": 0.75
|
||||
"td:nth-child(4):contains(\"20%\")": 0.8
|
||||
"td:nth-child(4):contains(\"15%\")": 0.85
|
||||
"td:nth-child(4):contains(\"10%\")": 0.9
|
||||
"td:nth-child(4):contains(\"5%\")": 0.95
|
||||
"*": 1
|
||||
uploadvolumefactor:
|
||||
case:
|
||||
"td:nth-child(4):contains(\"x2\")": 2
|
||||
"td:nth-child(4):contains(\"x3\")": 3
|
||||
"td:nth-child(4):contains(\"x4\")": 4
|
||||
"td:nth-child(4):contains(\"x5\")": 5
|
||||
"td:nth-child(4):contains(\"x6\")": 6
|
||||
"td:nth-child(4):contains(\"x7\")": 7
|
||||
"td:nth-child(4):contains(\"x8\")": 8
|
||||
"td:nth-child(4):contains(\"x9\")": 9
|
||||
"td:nth-child(5):contains(\"x2\")": 2
|
||||
"td:nth-child(5):contains(\"x3\")": 3
|
||||
"td:nth-child(5):contains(\"x4\")": 4
|
||||
"td:nth-child(5):contains(\"x5\")": 5
|
||||
"td:nth-child(5):contains(\"x6\")": 6
|
||||
"td:nth-child(5):contains(\"x7\")": 7
|
||||
"td:nth-child(5):contains(\"x8\")": 8
|
||||
"td:nth-child(5):contains(\"x9\")": 9
|
||||
"*": 1
|
||||
minimumratio:
|
||||
text: 1.0
|
||||
|
||||
@@ -37,6 +37,7 @@ caps:
|
||||
- {id: 26, cat: Movies, desc: " |- Фильмы до 2000 года"}
|
||||
# Сериалы, Видео и ТВ # Series, Videos and TV
|
||||
- {id: 97, cat: TV, desc: "Сериалы"}
|
||||
- {id: 333, cat: TV, desc: " |- Игра престолов / Game of Thrones"}
|
||||
- {id: 313, cat: TV, desc: " |- Секретные материалы \ The X-Files"}
|
||||
- {id: 103, cat: TV, desc: " |- Зарубежные сериалы"}
|
||||
- {id: 102, cat: TV, desc: " |- Российские сериалы"}
|
||||
|
||||
209
src/Jackett.Common/Indexers/Definitions/HDRTorrent.cs
Normal file
209
src/Jackett.Common/Indexers/Definitions/HDRTorrent.cs
Normal file
@@ -0,0 +1,209 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
using AngleSharp.Dom;
|
||||
using AngleSharp.Html.Parser;
|
||||
using Jackett.Common.Extensions;
|
||||
using Jackett.Common.Indexers.Definitions.Abstract;
|
||||
using Jackett.Common.Models;
|
||||
using Jackett.Common.Services.Interfaces;
|
||||
using Jackett.Common.Utils;
|
||||
using Jackett.Common.Utils.Clients;
|
||||
using NLog;
|
||||
using WebClient = Jackett.Common.Utils.Clients.WebClient;
|
||||
|
||||
namespace Jackett.Common.Indexers.Definitions
|
||||
{
|
||||
public class HDRTorrent : PublicBrazilianIndexerBase
|
||||
{
|
||||
public override string Id => "hdrtorrent";
|
||||
|
||||
public override string Name => "HDRTorrent";
|
||||
|
||||
public override string SiteLink { get; protected set; } = "https://hdrtorrent.com/";
|
||||
|
||||
public HDRTorrent(IIndexerConfigurationService configService, WebClient wc, Logger l, IProtectionService ps, ICacheService cs)
|
||||
: base(configService, wc, l, ps, cs)
|
||||
{
|
||||
}
|
||||
|
||||
public override IParseIndexerResponse GetParser() => new HDRTorrentParser(webclient);
|
||||
|
||||
public override IIndexerRequestGenerator GetRequestGenerator() => new SimpleRequestGenerator(SiteLink, searchQueryParamsKey: "index.php?s=");
|
||||
}
|
||||
|
||||
public class HDRTorrentParser : PublicBrazilianParser
|
||||
{
|
||||
private readonly WebClient _webclient;
|
||||
protected string Tracker;
|
||||
|
||||
public HDRTorrentParser(WebClient webclient)
|
||||
{
|
||||
_webclient = webclient;
|
||||
Tracker = "HDRTorrent";
|
||||
}
|
||||
|
||||
private Dictionary<string, string> ExtractFileInfo(IDocument detailsDom)
|
||||
{
|
||||
var fileInfo = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
|
||||
var infoSection = detailsDom.QuerySelector("div.infos p");
|
||||
if (infoSection == null)
|
||||
return fileInfo;
|
||||
|
||||
var lines = infoSection.InnerHtml.Split(new[] { "<br>" }, StringSplitOptions.RemoveEmptyEntries);
|
||||
foreach (var line in lines)
|
||||
{
|
||||
if (line.Contains("<b>") && line.Contains(":"))
|
||||
{
|
||||
var parts = line.Split(new[] { ':' }, 2);
|
||||
if (parts.Length == 2)
|
||||
{
|
||||
var key = parts[0].Replace("<b>", "").Replace("</b>", "").Trim();
|
||||
var value = parts[1]
|
||||
.Replace("<b>", "")
|
||||
.Replace("</b>", "")
|
||||
.Replace("<strong>", "")
|
||||
.Replace("</strong>", "")
|
||||
.Trim();
|
||||
|
||||
if (value.Contains("<"))
|
||||
{
|
||||
var tempDoc = new HtmlParser().ParseDocument(value);
|
||||
value = tempDoc.Body.TextContent.Trim();
|
||||
}
|
||||
|
||||
value = value switch
|
||||
{
|
||||
var v when v.Contains("Dual Áudio") => v.Replace("Dual Áudio", "Dual"),
|
||||
var v when v.Contains("Dual Audio") => v.Replace("Dual Audio", "Dual"),
|
||||
var v when v.Contains("Full HD") => v.Replace("Full HD", "1080p"),
|
||||
var v when v.Contains("4K") => v.Replace("4K", "2160p"),
|
||||
var v when v.Contains("SD") => v.Replace("SD", "480p"),
|
||||
var v when v.Contains("WEB") => v.Replace("WEB", "WEB-DL"),
|
||||
_ => value
|
||||
};
|
||||
|
||||
if (!string.IsNullOrEmpty(key) && !string.IsNullOrEmpty(value))
|
||||
{
|
||||
fileInfo[key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return fileInfo;
|
||||
}
|
||||
|
||||
public override IList<ReleaseInfo> ParseResponse(IndexerResponse indexerResponse)
|
||||
{
|
||||
var releases = new List<ReleaseInfo>();
|
||||
var parser = new HtmlParser();
|
||||
var dom = parser.ParseDocument(indexerResponse.Content);
|
||||
var rows = dom.QuerySelectorAll("div.capa-img");
|
||||
|
||||
foreach (var row in rows)
|
||||
{
|
||||
var h2Anchor = row.QuerySelector("h2 a");
|
||||
if (h2Anchor == null)
|
||||
continue;
|
||||
|
||||
var title = h2Anchor.TextContent.Trim();
|
||||
var detailUrlStr = h2Anchor.GetAttribute("href")?.Trim();
|
||||
if (string.IsNullOrEmpty(detailUrlStr))
|
||||
continue;
|
||||
|
||||
var detailUrl = new Uri(detailUrlStr);
|
||||
|
||||
var releaseCommonInfo = new ReleaseInfo
|
||||
{
|
||||
Title = CleanTitle(title),
|
||||
Details = detailUrl,
|
||||
Guid = detailUrl,
|
||||
Seeders = 1
|
||||
};
|
||||
|
||||
var detailsPage = _webclient.GetResultAsync(new WebRequest(detailUrl.ToString())).Result;
|
||||
var detailsDom = parser.ParseDocument(detailsPage.ContentString);
|
||||
|
||||
var fileInfoDict = ExtractFileInfo(detailsDom);
|
||||
var fileInfo = PublicBrazilianIndexerBase.FileInfo.FromDictionary(fileInfoDict);
|
||||
|
||||
var publishedMeta = detailsDom.QuerySelector("meta[property='article:published_time']")?.GetAttribute("content");
|
||||
if (!string.IsNullOrEmpty(publishedMeta) && DateTime.TryParse(publishedMeta, out var parsedDate))
|
||||
{
|
||||
releaseCommonInfo.PublishDate = parsedDate;
|
||||
}
|
||||
else
|
||||
{
|
||||
releaseCommonInfo.PublishDate = DateTime.Today;
|
||||
}
|
||||
|
||||
var magnetLinks = detailsDom.QuerySelectorAll("a[href^='magnet:?']");
|
||||
foreach (var magnetLink in magnetLinks)
|
||||
{
|
||||
var magnet = magnetLink.GetAttribute("href");
|
||||
if (string.IsNullOrEmpty(magnet))
|
||||
continue;
|
||||
|
||||
var release = releaseCommonInfo.Clone() as ReleaseInfo;
|
||||
release.Guid = release.MagnetUri = new Uri(magnet);
|
||||
|
||||
var parentText = magnetLink.ParentElement?.TextContent?.Trim();
|
||||
if (!string.IsNullOrEmpty(parentText))
|
||||
{
|
||||
parentText = Regex.Replace(parentText, "DOWNLOAD TORRENT", "", RegexOptions.IgnoreCase)
|
||||
.Replace("DUAL ÁUDIO", "Dual")
|
||||
.Replace("DUAL AUDIO", "Dual")
|
||||
.Replace("ÁUDIO", "Audio")
|
||||
.Replace("AUDIO", "Audio")
|
||||
.Replace("DUBLADO", "Dubbed")
|
||||
.Replace("LEGENDADO", "Subbed")
|
||||
.Replace("MKV", "")
|
||||
.Replace("MP4", "")
|
||||
.Replace("MAGNET", "")
|
||||
.Replace("TORRENT", "")
|
||||
.Replace("LINK", "")
|
||||
.Trim();
|
||||
|
||||
if (!string.IsNullOrEmpty(parentText))
|
||||
{
|
||||
release.Title = $"{release.Title} {parentText}".Trim();
|
||||
}
|
||||
}
|
||||
|
||||
var resolution = fileInfo.Quality ?? fileInfo.VideoQuality ?? string.Empty;
|
||||
if (!string.IsNullOrEmpty(resolution))
|
||||
release.Title = $"{release.Title} {resolution}".Trim();
|
||||
|
||||
release.Category = magnetLink.ExtractCategory(release.Title);
|
||||
var size = RowParsingExtensions.GetBytes(fileInfo.Size ?? string.Empty);
|
||||
release.Size = size > 0 ? size : ExtractSizeByResolution(release.Title);
|
||||
|
||||
release.DownloadVolumeFactor = 0;
|
||||
release.UploadVolumeFactor = 1;
|
||||
|
||||
release.Languages = fileInfo.Audio?.ToList() ?? release.Languages;
|
||||
release.Genres = fileInfo.Genres?.ToList() ?? release.Genres;
|
||||
release.Subs = string.IsNullOrEmpty(fileInfo.Subtitle) ? release.Subs : new[] { fileInfo.Subtitle };
|
||||
|
||||
if (release.Title.IsNotNullOrWhiteSpace())
|
||||
releases.Add(release);
|
||||
}
|
||||
}
|
||||
|
||||
return releases;
|
||||
}
|
||||
|
||||
protected override INode GetTitleElementOrNull(IElement downloadButton)
|
||||
{
|
||||
var description = downloadButton.PreviousSibling;
|
||||
while (description != null && description.NodeType != NodeType.Text)
|
||||
{
|
||||
description = description.PreviousSibling;
|
||||
}
|
||||
|
||||
return description;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user