mirror of
https://github.com/Jackett/Jackett
synced 2025-03-04 18:59:01 +00:00
parent
d490b007ff
commit
03cc3f4f60
7 changed files with 171 additions and 163 deletions
|
@ -1,89 +0,0 @@
|
|||
---
|
||||
id: exoticaz
|
||||
name: ExoticaZ
|
||||
description: "ExoticaZ (YourExotic) is a Private Torrent Tracker for 3X"
|
||||
language: en-us
|
||||
type: private
|
||||
encoding: UTF-8
|
||||
links:
|
||||
- https://exoticaz.to/
|
||||
legacylinks:
|
||||
- https://torrents.yourexotic.com/
|
||||
|
||||
caps:
|
||||
categorymappings:
|
||||
- {id: 1, cat: XXX, desc: "DVDRip"}
|
||||
|
||||
modes:
|
||||
search: [q]
|
||||
tv-search: [q]
|
||||
movie-search: [q]
|
||||
|
||||
login:
|
||||
path: login
|
||||
method: form
|
||||
inputs:
|
||||
username_email: "{{ .Config.username }}"
|
||||
password: "{{ .Config.password }}"
|
||||
remember: on
|
||||
captcha:
|
||||
type: image
|
||||
selector: img[alt="Captcha Image"]
|
||||
input: captcha
|
||||
error:
|
||||
- selector: div.invalid-feedback
|
||||
test:
|
||||
selector: div.ratio-bar
|
||||
|
||||
search:
|
||||
path: torrents
|
||||
inputs:
|
||||
# 0 any 1 filename 2 descr 3 files
|
||||
in: 1
|
||||
search: "{{ .Keywords }}"
|
||||
category: 0
|
||||
|
||||
rows:
|
||||
selector: div.table-responsive > table > tbody > tr
|
||||
|
||||
fields:
|
||||
category:
|
||||
text: 1
|
||||
title:
|
||||
selector: a.torrent-link
|
||||
attribute: title
|
||||
details:
|
||||
selector: a.torrent-link
|
||||
attribute: href
|
||||
download:
|
||||
selector: a[href*="/download/"]
|
||||
attribute: href
|
||||
banner:
|
||||
selector: .screen-image
|
||||
attribute: data-screens
|
||||
filters:
|
||||
- name: split
|
||||
args: ["|", 0]
|
||||
date:
|
||||
selector: td:nth-last-child(5)
|
||||
filters:
|
||||
- name: append
|
||||
args: " ago"
|
||||
size:
|
||||
selector: td:nth-last-child(4)
|
||||
seeders:
|
||||
selector: td:nth-last-child(3)
|
||||
leechers:
|
||||
selector: td:nth-last-child(2)
|
||||
grabs:
|
||||
selector: td:nth-last-child(1)
|
||||
downloadvolumefactor:
|
||||
case:
|
||||
i[title="Free Download"]: 0
|
||||
i[title="Half Download"]: 0.5
|
||||
"*": 1
|
||||
uploadvolumefactor:
|
||||
case:
|
||||
i.fa-gem: 2
|
||||
"*": 1
|
||||
# engine tbd
|
|
@ -34,6 +34,79 @@ namespace Jackett.Common.Indexers.Abstract
|
|||
// hook to adjust the search term
|
||||
protected virtual string GetSearchTerm(TorznabQuery query) => $"{query.SearchTerm} {query.GetEpisodeSearchString()}";
|
||||
|
||||
// hook to adjust the search category
|
||||
protected virtual List<KeyValuePair<string, string>> GetSearchQueryParameters(TorznabQuery query)
|
||||
{
|
||||
var categoryMapping = MapTorznabCapsToTrackers(query).Distinct().ToList();
|
||||
var qc = new List<KeyValuePair<string, string>> // NameValueCollection don't support cat[]=19&cat[]=6
|
||||
{
|
||||
{"in", "1"},
|
||||
{"type", categoryMapping.Any() ? categoryMapping.First() : "0"}
|
||||
};
|
||||
|
||||
// resolution filter to improve the search
|
||||
if (!query.Categories.Contains(TorznabCatType.Movies.ID) && !query.Categories.Contains(TorznabCatType.TV.ID) &&
|
||||
!query.Categories.Contains(TorznabCatType.Audio.ID))
|
||||
{
|
||||
if (query.Categories.Contains(TorznabCatType.MoviesUHD.ID) || query.Categories.Contains(TorznabCatType.TVUHD.ID))
|
||||
qc.Add("video_quality[]", "6"); // 2160p
|
||||
if (query.Categories.Contains(TorznabCatType.MoviesHD.ID) || query.Categories.Contains(TorznabCatType.TVHD.ID))
|
||||
{
|
||||
qc.Add("video_quality[]", "2"); // 720p
|
||||
qc.Add("video_quality[]", "7"); // 1080i
|
||||
qc.Add("video_quality[]", "3"); // 1080p
|
||||
}
|
||||
if (query.Categories.Contains(TorznabCatType.MoviesSD.ID) || query.Categories.Contains(TorznabCatType.TVSD.ID))
|
||||
qc.Add("video_quality[]", "1"); // SD
|
||||
}
|
||||
|
||||
// note, search by tmdb and tvdb are supported too
|
||||
// https://privatehd.to/api/v1/jackett/torrents?tmdb=1234
|
||||
// https://privatehd.to/api/v1/jackett/torrents?tvdb=3653
|
||||
if (query.IsImdbQuery)
|
||||
qc.Add("imdb", query.ImdbID);
|
||||
else
|
||||
qc.Add("search", GetSearchTerm(query).Trim());
|
||||
|
||||
return qc;
|
||||
}
|
||||
|
||||
// hook to adjust category parsing
|
||||
protected virtual List<int> ParseCategories(TorznabQuery query, JToken row)
|
||||
{
|
||||
var cats = new List<int>();
|
||||
var resolution = row.Value<string>("video_quality");
|
||||
switch(row.Value<string>("type"))
|
||||
{
|
||||
case "Movie":
|
||||
if (query.Categories.Contains(TorznabCatType.Movies.ID))
|
||||
cats.Add(TorznabCatType.Movies.ID);
|
||||
cats.Add(resolution switch
|
||||
{
|
||||
var res when _hdResolutions.Contains(res) => TorznabCatType.MoviesHD.ID,
|
||||
"2160p" => TorznabCatType.MoviesUHD.ID,
|
||||
_ => TorznabCatType.MoviesSD.ID
|
||||
});
|
||||
break;
|
||||
case "TV-Show":
|
||||
if (query.Categories.Contains(TorznabCatType.TV.ID))
|
||||
cats.Add(TorznabCatType.TV.ID);
|
||||
cats.Add(resolution switch
|
||||
{
|
||||
var res when _hdResolutions.Contains(res) => TorznabCatType.TVHD.ID,
|
||||
"2160p" => TorznabCatType.TVUHD.ID,
|
||||
_ => TorznabCatType.TVSD.ID
|
||||
});
|
||||
break;
|
||||
case "Music":
|
||||
cats.Add(TorznabCatType.Audio.ID);
|
||||
break;
|
||||
default:
|
||||
throw new Exception("Error parsing category!");
|
||||
}
|
||||
return cats;
|
||||
}
|
||||
|
||||
protected AvistazTracker(string link, string id, string name, string description,
|
||||
IIndexerConfigurationService configService, WebClient client, Logger logger,
|
||||
IProtectionService p, TorznabCapabilities caps)
|
||||
|
@ -51,16 +124,7 @@ without this configuration the torrent download does not work.<br/>You can find
|
|||
{
|
||||
Encoding = Encoding.UTF8;
|
||||
Language = "en-us";
|
||||
|
||||
AddCategoryMapping(1, TorznabCatType.Movies);
|
||||
AddCategoryMapping(1, TorznabCatType.MoviesUHD);
|
||||
AddCategoryMapping(1, TorznabCatType.MoviesHD);
|
||||
AddCategoryMapping(1, TorznabCatType.MoviesSD);
|
||||
AddCategoryMapping(2, TorznabCatType.TV);
|
||||
AddCategoryMapping(2, TorznabCatType.TVUHD);
|
||||
AddCategoryMapping(2, TorznabCatType.TVHD);
|
||||
AddCategoryMapping(2, TorznabCatType.TVSD);
|
||||
AddCategoryMapping(3, TorznabCatType.Audio);
|
||||
Type = "private";
|
||||
}
|
||||
|
||||
public override async Task<IndexerConfigurationStatus> ApplyConfiguration(JToken configJson)
|
||||
|
@ -95,37 +159,7 @@ without this configuration the torrent download does not work.<br/>You can find
|
|||
{
|
||||
var releases = new List<ReleaseInfo>();
|
||||
|
||||
var categoryMapping = MapTorznabCapsToTrackers(query).Distinct().ToList();
|
||||
var qc = new List<KeyValuePair<string, string>> // NameValueCollection don't support cat[]=19&cat[]=6
|
||||
{
|
||||
{"in", "1"},
|
||||
{"type", categoryMapping.Any() ? categoryMapping.First() : "0"} // type=0 => all categories
|
||||
};
|
||||
|
||||
// resolution filter to improve the search
|
||||
if (!query.Categories.Contains(TorznabCatType.Movies.ID) && !query.Categories.Contains(TorznabCatType.TV.ID) &&
|
||||
!query.Categories.Contains(TorznabCatType.Audio.ID))
|
||||
{
|
||||
if (query.Categories.Contains(TorznabCatType.MoviesUHD.ID) || query.Categories.Contains(TorznabCatType.TVUHD.ID))
|
||||
qc.Add("video_quality[]", "6"); // 2160p
|
||||
if (query.Categories.Contains(TorznabCatType.MoviesHD.ID) || query.Categories.Contains(TorznabCatType.TVHD.ID))
|
||||
{
|
||||
qc.Add("video_quality[]", "2"); // 720p
|
||||
qc.Add("video_quality[]", "7"); // 1080i
|
||||
qc.Add("video_quality[]", "3"); // 1080p
|
||||
}
|
||||
if (query.Categories.Contains(TorznabCatType.MoviesSD.ID) || query.Categories.Contains(TorznabCatType.TVSD.ID))
|
||||
qc.Add("video_quality[]", "1"); // SD
|
||||
}
|
||||
|
||||
// note, search by tmdb and tvdb are supported too
|
||||
// https://privatehd.to/api/v1/jackett/torrents?tmdb=1234
|
||||
// https://privatehd.to/api/v1/jackett/torrents?tvdb=3653
|
||||
if (query.IsImdbQuery)
|
||||
qc.Add("imdb", query.ImdbID);
|
||||
else
|
||||
qc.Add("search", GetSearchTerm(query).Trim());
|
||||
|
||||
var qc = GetSearchQueryParameters(query);
|
||||
var episodeSearchUrl = SearchUrl + "?" + qc.GetQueryString();
|
||||
var response = await RequestStringWithCookiesAndRetry(episodeSearchUrl, headers: GetSearchHeaders());
|
||||
if (response.Status == HttpStatusCode.Unauthorized || response.Status == HttpStatusCode.PreconditionFailed)
|
||||
|
@ -172,36 +206,7 @@ without this configuration the torrent download does not work.<br/>You can find
|
|||
description += $"<br/>Subtitles: {string.Join(", ", subtitleList)}";
|
||||
}
|
||||
|
||||
var cats = new List<int>();
|
||||
var resolution = row.Value<string>("video_quality");
|
||||
switch(row.Value<string>("type"))
|
||||
{
|
||||
case "Movie":
|
||||
if (query.Categories.Contains(TorznabCatType.Movies.ID))
|
||||
cats.Add(TorznabCatType.Movies.ID);
|
||||
cats.Add(resolution switch
|
||||
{
|
||||
var res when _hdResolutions.Contains(res) => TorznabCatType.MoviesHD.ID,
|
||||
"2160p" => TorznabCatType.MoviesUHD.ID,
|
||||
_ => TorznabCatType.MoviesSD.ID
|
||||
});
|
||||
break;
|
||||
case "TV-Show":
|
||||
if (query.Categories.Contains(TorznabCatType.TV.ID))
|
||||
cats.Add(TorznabCatType.TV.ID);
|
||||
cats.Add(resolution switch
|
||||
{
|
||||
var res when _hdResolutions.Contains(res) => TorznabCatType.TVHD.ID,
|
||||
"2160p" => TorznabCatType.TVUHD.ID,
|
||||
_ => TorznabCatType.TVSD.ID
|
||||
});
|
||||
break;
|
||||
case "Music":
|
||||
cats.Add(TorznabCatType.Audio.ID);
|
||||
break;
|
||||
default:
|
||||
throw new Exception("Error parsing category!");
|
||||
}
|
||||
var cats = ParseCategories(query, row);
|
||||
|
||||
var release = new ReleaseInfo
|
||||
{
|
||||
|
|
|
@ -24,7 +24,17 @@ namespace Jackett.Common.Indexers
|
|||
client: wc,
|
||||
logger: l,
|
||||
p: ps)
|
||||
=> Type = "private";
|
||||
{
|
||||
AddCategoryMapping(1, TorznabCatType.Movies);
|
||||
AddCategoryMapping(1, TorznabCatType.MoviesUHD);
|
||||
AddCategoryMapping(1, TorznabCatType.MoviesHD);
|
||||
AddCategoryMapping(1, TorznabCatType.MoviesSD);
|
||||
AddCategoryMapping(2, TorznabCatType.TV);
|
||||
AddCategoryMapping(2, TorznabCatType.TVUHD);
|
||||
AddCategoryMapping(2, TorznabCatType.TVHD);
|
||||
AddCategoryMapping(2, TorznabCatType.TVSD);
|
||||
AddCategoryMapping(3, TorznabCatType.Audio);
|
||||
}
|
||||
|
||||
// Avistaz has episodes without season. eg Running Man E323
|
||||
protected override string GetSearchTerm(TorznabQuery query) =>
|
||||
|
|
|
@ -24,6 +24,16 @@ namespace Jackett.Common.Indexers
|
|||
client: wc,
|
||||
logger: l,
|
||||
p: ps)
|
||||
=> Type = "private";
|
||||
{
|
||||
AddCategoryMapping(1, TorznabCatType.Movies);
|
||||
AddCategoryMapping(1, TorznabCatType.MoviesUHD);
|
||||
AddCategoryMapping(1, TorznabCatType.MoviesHD);
|
||||
AddCategoryMapping(1, TorznabCatType.MoviesSD);
|
||||
AddCategoryMapping(2, TorznabCatType.TV);
|
||||
AddCategoryMapping(2, TorznabCatType.TVUHD);
|
||||
AddCategoryMapping(2, TorznabCatType.TVHD);
|
||||
AddCategoryMapping(2, TorznabCatType.TVSD);
|
||||
AddCategoryMapping(3, TorznabCatType.Audio);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
61
src/Jackett.Common/Indexers/ExoticaZ.cs
Normal file
61
src/Jackett.Common/Indexers/ExoticaZ.cs
Normal file
|
@ -0,0 +1,61 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Linq;
|
||||
using Jackett.Common.Indexers.Abstract;
|
||||
using Jackett.Common.Models;
|
||||
using Jackett.Common.Services.Interfaces;
|
||||
using Jackett.Common.Utils;
|
||||
using Jackett.Common.Utils.Clients;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using NLog;
|
||||
|
||||
namespace Jackett.Common.Indexers
|
||||
{
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class ExoticaZ : AvistazTracker
|
||||
{
|
||||
public override string[] LegacySiteLinks { get; protected set; } =
|
||||
{
|
||||
"https://torrents.yourexotic.com/"
|
||||
};
|
||||
|
||||
public ExoticaZ(IIndexerConfigurationService configService, WebClient wc, Logger l, IProtectionService ps)
|
||||
: base(id: "exoticaz",
|
||||
name: "ExoticaZ",
|
||||
description: "ExoticaZ (YourExotic) is a Private Torrent Tracker for 3X",
|
||||
link: "https://exoticaz.to/",
|
||||
caps: new TorznabCapabilities(),
|
||||
configService: configService,
|
||||
client: wc,
|
||||
logger: l,
|
||||
p: ps)
|
||||
{
|
||||
AddCategoryMapping(1, TorznabCatType.XXXx264);
|
||||
AddCategoryMapping(2, TorznabCatType.XXXPacks);
|
||||
AddCategoryMapping(3, TorznabCatType.XXXPacks);
|
||||
AddCategoryMapping(4, TorznabCatType.XXXPacks);
|
||||
AddCategoryMapping(5, TorznabCatType.XXXDVD);
|
||||
AddCategoryMapping(6, TorznabCatType.XXXOther);
|
||||
AddCategoryMapping(7, TorznabCatType.XXXImageset);
|
||||
}
|
||||
|
||||
protected override List<KeyValuePair<string, string>> GetSearchQueryParameters(TorznabQuery query)
|
||||
{
|
||||
var categoryMapping = MapTorznabCapsToTrackers(query).Distinct().ToList();
|
||||
var qc = new List<KeyValuePair<string, string>> // NameValueCollection don't support cat[]=19&cat[]=6
|
||||
{
|
||||
{"in", "1"},
|
||||
{"category", categoryMapping.Any() ? categoryMapping.First() : "0"},
|
||||
{"search", GetSearchTerm(query).Trim()}
|
||||
};
|
||||
|
||||
return qc;
|
||||
}
|
||||
|
||||
protected override List<int> ParseCategories(TorznabQuery query, JToken row)
|
||||
{
|
||||
var cat = row.Value<JObject>("category").Properties().First().Name;
|
||||
return MapTrackerCatToNewznab(cat).ToList();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -24,6 +24,16 @@ namespace Jackett.Common.Indexers
|
|||
client: wc,
|
||||
logger: l,
|
||||
p: ps)
|
||||
=> Type = "private";
|
||||
{
|
||||
AddCategoryMapping(1, TorznabCatType.Movies);
|
||||
AddCategoryMapping(1, TorznabCatType.MoviesUHD);
|
||||
AddCategoryMapping(1, TorznabCatType.MoviesHD);
|
||||
AddCategoryMapping(1, TorznabCatType.MoviesSD);
|
||||
AddCategoryMapping(2, TorznabCatType.TV);
|
||||
AddCategoryMapping(2, TorznabCatType.TVUHD);
|
||||
AddCategoryMapping(2, TorznabCatType.TVHD);
|
||||
AddCategoryMapping(2, TorznabCatType.TVSD);
|
||||
AddCategoryMapping(3, TorznabCatType.Audio);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -306,6 +306,7 @@ namespace Jackett.Updater
|
|||
"Definitions/eotforum.yml",
|
||||
"Definitions/estrenosdtl.yml",
|
||||
"Definitions/evolutionpalace.yml",
|
||||
"Definitions/exoticaz.yml", // migrated to C#
|
||||
"Definitions/extratorrentclone.yml",
|
||||
"Definitions/feedurneed.yml",
|
||||
"Definitions/freakstrackingsystem.yml",
|
||||
|
|
Loading…
Add table
Reference in a new issue