mirror of
https://github.com/Jackett/Jackett.git
synced 2025-12-16 11:54:45 +01:00
Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1ec83cd58a | ||
|
|
79271d2954 | ||
|
|
10d7e7a7d8 | ||
|
|
4da1aa9915 | ||
|
|
8119b31655 | ||
|
|
8a59aaebd6 | ||
|
|
7b11313e51 | ||
|
|
51ad79f099 | ||
|
|
58558dc8d4 | ||
|
|
f139c47a36 |
@@ -614,7 +614,6 @@ Prior versions of Jackett are no longer supported.
|
||||
* Zappateers
|
||||
* Zelka.org
|
||||
* ZmPT (织梦)
|
||||
* ZonaQ [![(invite needed)][inviteneeded]](#)
|
||||
</details>
|
||||
|
||||
Trackers marked with [![(invite needed)][inviteneeded]](#) have no active maintainer and may be broken or missing features. If you have an invite please send it to jacketttest [at] gmail [dot] com or garfieldsixtynine [at] gmail [dot] com get them fixed/improved.
|
||||
@@ -721,7 +720,7 @@ Jackett can also be run from the command line if you would like to see log messa
|
||||
|
||||
|
||||
## Installation on Linux (AMDx64)
|
||||
On most operating systems all the required dependencies will already be present. In case they are not, you can refer to this page https://github.com/dotnet/core/blob/master/Documentation/linux-prereqs.md
|
||||
On most operating systems all the required dependencies will already be present. In case they are not, you can refer to the [.NET Required Packages](https://github.com/dotnet/core/blob/main/release-notes/9.0/os-packages.md) page.
|
||||
|
||||
### Install as service
|
||||
A) Command to download and install the latest package and run the Jackett service:
|
||||
@@ -741,7 +740,7 @@ If you want to run it with a user without a /home directory you need to add `Env
|
||||
|
||||
|
||||
## Installation on Linux (ARMv7 or above)
|
||||
On most operating systems all the required dependencies will already be present. In case they are not, you can refer to this page https://github.com/dotnet/core/blob/master/Documentation/linux-prereqs.md
|
||||
On most operating systems all the required dependencies will already be present. In case they are not, you can refer to the [.NET Required Packages](https://github.com/dotnet/core/blob/main/release-notes/9.0/os-packages.md) page.
|
||||
|
||||
### Install as service
|
||||
1. Download and extract the latest `Jackett.Binaries.LinuxARM32.tar.gz` or `Jackett.Binaries.LinuxARM64.tar.gz` (32 bit is the most common on ARM) release from the [releases](https://github.com/Jackett/Jackett/releases/latest) page
|
||||
|
||||
@@ -57,6 +57,7 @@ caps:
|
||||
movie-search: [q, imdbid, genre]
|
||||
music-search: [q, genre]
|
||||
book-search: [q, genre]
|
||||
allowrawsearch: true
|
||||
|
||||
settings:
|
||||
- name: username
|
||||
|
||||
@@ -43,6 +43,8 @@ caps:
|
||||
- {id: 1830, cat: XXX, desc: "Сайтрипы с русскими актрисами 1991-2015 (HD Video) / Russian SiteRip's 1991-2015 (HD Video)"}
|
||||
- {id: 1803, cat: XXX, desc: "Сайтрипы с русскими актрисами 2016-2025 / Russian SiteRip's 2016-2025"}
|
||||
- {id: 1831, cat: XXX, desc: "Сайтрипы с русскими актрисами 2016-2025 (HD Video) / Russian SiteRip's 2016-2025 (HD Video)"}
|
||||
- {id: 1877, cat: XXX, desc: "Сайтрипы с русскими актрисами 2026 / Russian SiteRip's 2026"}
|
||||
- {id: 1878, cat: XXX, desc: "Сайтрипы с русскими актрисами 2026 (HD Video) / Russian SiteRip's 2026 (HD Video)"}
|
||||
- {id: 1741, cat: XXX, desc: "Русские Порноролики Разное / Russian Clips (various)"}
|
||||
- {id: 1676, cat: XXX, desc: "Русское любительское видео / Russian Amateur Video"}
|
||||
|
||||
@@ -80,6 +82,7 @@ caps:
|
||||
- {id: 1862, cat: XXX, desc: "Сайтрипы 2023 / SiteRip's 2023"}
|
||||
- {id: 1868, cat: XXX, desc: "Сайтрипы 2024 / SiteRip's 2024"}
|
||||
- {id: 1873, cat: XXX, desc: "Сайтрипы 2025 / SiteRip's 2025"}
|
||||
- {id: 1876, cat: XXX, desc: "Сайтрипы 2026 / SiteRip's 2026"}
|
||||
- {id: 1707, cat: XXX, desc: "Сцены из фильмов / Movie Scenes (кроме SiteRip)"}
|
||||
- {id: 284, cat: XXX, desc: "Порноролики Разное / Clips (various)"}
|
||||
- {id: 1853, cat: XXX, desc: "Компиляции и Музыкальные порно клипы / Compilations & Porn Music Video (PMV)"}
|
||||
|
||||
@@ -10,14 +10,8 @@ encoding: windows-1251
|
||||
followredirect: true
|
||||
# alternate TLDs are: buzz, homes, mom, online, shop, top and xyz
|
||||
links:
|
||||
- https://dec13.rudub.bet/
|
||||
- https://dec16.rudub.bet/
|
||||
legacylinks:
|
||||
- http://nov29.rudub.world/
|
||||
- https://nov29.rudub.world/
|
||||
- http://nov30.rudub.world/
|
||||
- https://nov30.rudub.world/
|
||||
- http://dec01.rudub.world/
|
||||
- https://dec01.rudub.world/
|
||||
- http://dec02.rudub.world/
|
||||
- https://dec02.rudub.world/
|
||||
- http://dec03.rudub.world/
|
||||
@@ -42,6 +36,12 @@ legacylinks:
|
||||
- http://dec12.rudub.bet/
|
||||
- https://dec12.rudub.bet/
|
||||
- http://dec13.rudub.bet/
|
||||
- https://dec13.rudub.bet/
|
||||
- http://dec14.rudub.bet/
|
||||
- https://dec14.rudub.bet/
|
||||
- http://dec15.rudub.bet/
|
||||
- https://dec15.rudub.bet/
|
||||
- http://dec16.rudub.bet/
|
||||
caps:
|
||||
categorymappings:
|
||||
- {id: 1, cat: TV, desc: "TV"}
|
||||
|
||||
@@ -11,14 +11,15 @@ links:
|
||||
caps:
|
||||
categorymappings:
|
||||
- {id: 29, cat: TV, desc: "Comedy"}
|
||||
- {id: 45, cat: TV, desc: "Current Affairs"}
|
||||
- {id: 5, cat: TV/Documentary, desc: "Documentary"}
|
||||
- {id: 11, cat: TV, desc: "Drama"}
|
||||
- {id: 14, cat: TV, desc: "Entertainment"}
|
||||
- {id: 19, cat: TV, desc: "Factual"}
|
||||
- {id: 43, cat: TV, desc: "Foreign"}
|
||||
- {id: 32, cat: TV, desc: "Kids/Family"}
|
||||
- {id: 32, cat: TV, desc: "Kids & Family"}
|
||||
- {id: 44, cat: Movies, desc: "Movies"}
|
||||
- {id: 45, cat: TV, desc: "News & Current Affairs"}
|
||||
- {id: 54, cat: TV, desc: "News"}
|
||||
- {id: 51, cat: Audio, desc: "Radio"}
|
||||
- {id: 52, cat: TV, desc: "Reality"}
|
||||
- {id: 30, cat: TV, desc: "Soaps"}
|
||||
|
||||
@@ -7,10 +7,10 @@ type: private
|
||||
encoding: UTF-8
|
||||
followredirect: true
|
||||
requestDelay: 4
|
||||
# status https://www.yggtorrent.org/engine/domains
|
||||
links:
|
||||
- https://www.yggtorrent.top/
|
||||
- https://www.yggtorrent.org/
|
||||
legacylinks:
|
||||
- https://www2.yggtorrent.si/
|
||||
- https://www.yggtorrent.li/
|
||||
- https://www4.yggtorrent.li/
|
||||
- https://www3.yggtorrent.nz/
|
||||
@@ -25,6 +25,7 @@ legacylinks:
|
||||
- https://www3.yggtorrent.qa/
|
||||
- https://www3.yggtorrent.cool/
|
||||
- https://www.ygg.re/
|
||||
- https://www.yggtorrent.top/
|
||||
|
||||
caps:
|
||||
# dont forget to update the search fields category case block
|
||||
|
||||
@@ -7,10 +7,10 @@ type: private
|
||||
encoding: UTF-8
|
||||
followredirect: true
|
||||
requestDelay: 4
|
||||
# status https://www.yggtorrent.org/engine/domains
|
||||
links:
|
||||
- https://www.yggtorrent.top/
|
||||
- https://www.yggtorrent.org/
|
||||
legacylinks:
|
||||
- https://www2.yggtorrent.si/
|
||||
- https://www.yggtorrent.li/
|
||||
- https://www4.yggtorrent.li/
|
||||
- https://www3.yggtorrent.nz/
|
||||
@@ -25,6 +25,7 @@ legacylinks:
|
||||
- https://www3.yggtorrent.qa/
|
||||
- https://www3.yggtorrent.cool/
|
||||
- https://www.ygg.re/
|
||||
- https://www.yggtorrent.top/
|
||||
|
||||
caps:
|
||||
# dont forget to update the search fields category case block
|
||||
@@ -168,11 +169,12 @@ settings:
|
||||
login:
|
||||
method: form
|
||||
path: /auth/login
|
||||
form: form.login-form
|
||||
form: form.auth-form
|
||||
inputs:
|
||||
id: "{{ .Config.username }}"
|
||||
pass: "{{ .Config.password }}"
|
||||
error:
|
||||
- selector: :root:contains("Bad credentials.")
|
||||
- selector: p.error-form
|
||||
- selector: a[href$="/user/disabled"]
|
||||
message:
|
||||
|
||||
@@ -1,293 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using AngleSharp.Html.Parser;
|
||||
using Jackett.Common.Extensions;
|
||||
using Jackett.Common.Models;
|
||||
using Jackett.Common.Models.IndexerConfig;
|
||||
using Jackett.Common.Services.Interfaces;
|
||||
using Jackett.Common.Utils;
|
||||
using Jackett.Common.Utils.Clients;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using NLog;
|
||||
using WebClient = Jackett.Common.Utils.Clients.WebClient;
|
||||
|
||||
namespace Jackett.Common.Indexers.Definitions
|
||||
{
|
||||
[ExcludeFromCodeCoverage]
|
||||
public class ZonaQ : IndexerBase
|
||||
{
|
||||
public override string Id => "zonaq";
|
||||
public override string Name => "ZonaQ";
|
||||
public override string Description => "ZonaQ is a SPANISH Private Torrent Tracker for MOVIES / TV";
|
||||
public override string SiteLink { get; protected set; } = "https://www.zonaq.pw/";
|
||||
public override string Language => "es-ES";
|
||||
public override string Type => "private";
|
||||
|
||||
public override TorznabCapabilities TorznabCaps => SetCapabilities();
|
||||
|
||||
private string Login1Url => SiteLink + "index.php";
|
||||
private string Login2Url => SiteLink + "paDentro.php";
|
||||
private string Login3Url => SiteLink + "retorno/include/puerta_8_ajax.php";
|
||||
private string Login4Url => SiteLink + "retorno/index.php";
|
||||
private string SearchUrl => SiteLink + "retorno/2/index.php";
|
||||
|
||||
private new ConfigurationDataBasicLogin configData => (ConfigurationDataBasicLogin)base.configData;
|
||||
|
||||
public ZonaQ(IIndexerConfigurationService configService, WebClient wc, Logger l, IProtectionService ps, ICacheService cs)
|
||||
: base(configService: configService,
|
||||
client: wc,
|
||||
logger: l,
|
||||
p: ps,
|
||||
cacheService: cs,
|
||||
configData: new ConfigurationDataBasicLogin("For best results, change the 'Torrents por página' option to 100 in 'Mi Panel' page."))
|
||||
{
|
||||
}
|
||||
|
||||
private TorznabCapabilities SetCapabilities()
|
||||
{
|
||||
var caps = new TorznabCapabilities
|
||||
{
|
||||
TvSearchParams = new List<TvSearchParam>
|
||||
{
|
||||
TvSearchParam.Q, TvSearchParam.Season, TvSearchParam.Ep
|
||||
},
|
||||
MovieSearchParams = new List<MovieSearchParam>
|
||||
{
|
||||
MovieSearchParam.Q
|
||||
}
|
||||
};
|
||||
|
||||
caps.Categories.AddCategoryMapping("cat[]=1&subcat[]=1", TorznabCatType.MoviesDVD, "Películas/DVD");
|
||||
caps.Categories.AddCategoryMapping("cat[]=1&subcat[]=2", TorznabCatType.MoviesDVD, "Películas/BDVD + Autorías");
|
||||
caps.Categories.AddCategoryMapping("cat[]=1&subcat[]=3", TorznabCatType.MoviesBluRay, "Películas/BD");
|
||||
caps.Categories.AddCategoryMapping("cat[]=1&subcat[]=4", TorznabCatType.MoviesUHD, "Películas/BD 4K");
|
||||
caps.Categories.AddCategoryMapping("cat[]=1&subcat[]=5", TorznabCatType.Movies3D, "Películas/BD 3D");
|
||||
caps.Categories.AddCategoryMapping("cat[]=1&subcat[]=6", TorznabCatType.MoviesBluRay, "Películas/BD Remux");
|
||||
caps.Categories.AddCategoryMapping("cat[]=1&subcat[]=7", TorznabCatType.MoviesHD, "Películas/MKV");
|
||||
caps.Categories.AddCategoryMapping("cat[]=1&subcat[]=8", TorznabCatType.MoviesUHD, "Películas/MKV 4K");
|
||||
caps.Categories.AddCategoryMapping("cat[]=1&subcat[]=9", TorznabCatType.MoviesUHD, "Películas/BD Remux 4K");
|
||||
|
||||
caps.Categories.AddCategoryMapping("cat[]=2&subcat[]=1", TorznabCatType.MoviesDVD, "Animación/DVD");
|
||||
caps.Categories.AddCategoryMapping("cat[]=2&subcat[]=2", TorznabCatType.MoviesDVD, "Animación/BDVD + Autorías");
|
||||
caps.Categories.AddCategoryMapping("cat[]=2&subcat[]=3", TorznabCatType.MoviesBluRay, "Animación/BD");
|
||||
caps.Categories.AddCategoryMapping("cat[]=2&subcat[]=4", TorznabCatType.MoviesUHD, "Animación/BD 4K");
|
||||
caps.Categories.AddCategoryMapping("cat[]=2&subcat[]=5", TorznabCatType.Movies3D, "Animación/BD 3D");
|
||||
caps.Categories.AddCategoryMapping("cat[]=2&subcat[]=6", TorznabCatType.MoviesBluRay, "Animación/BD Remux");
|
||||
caps.Categories.AddCategoryMapping("cat[]=2&subcat[]=7", TorznabCatType.MoviesHD, "Animación/MKV");
|
||||
caps.Categories.AddCategoryMapping("cat[]=2&subcat[]=8", TorznabCatType.MoviesUHD, "Animación/MKV 4K");
|
||||
caps.Categories.AddCategoryMapping("cat[]=2&subcat[]=9", TorznabCatType.MoviesUHD, "Animación/BD Remux 4K");
|
||||
|
||||
caps.Categories.AddCategoryMapping("cat[]=3&subcat[]=1", TorznabCatType.AudioVideo, "Música/DVD");
|
||||
caps.Categories.AddCategoryMapping("cat[]=3&subcat[]=2", TorznabCatType.AudioVideo, "Música/BDVD + Autorías");
|
||||
caps.Categories.AddCategoryMapping("cat[]=3&subcat[]=3", TorznabCatType.AudioVideo, "Música/BD");
|
||||
caps.Categories.AddCategoryMapping("cat[]=3&subcat[]=4", TorznabCatType.AudioVideo, "Música/BD 4K");
|
||||
caps.Categories.AddCategoryMapping("cat[]=3&subcat[]=5", TorznabCatType.AudioVideo, "Música/BD 3D");
|
||||
caps.Categories.AddCategoryMapping("cat[]=3&subcat[]=6", TorznabCatType.AudioVideo, "Música/BD Remux");
|
||||
caps.Categories.AddCategoryMapping("cat[]=3&subcat[]=7", TorznabCatType.AudioVideo, "Música/MKV");
|
||||
caps.Categories.AddCategoryMapping("cat[]=3&subcat[]=8", TorznabCatType.AudioVideo, "Música/MKV 4K");
|
||||
caps.Categories.AddCategoryMapping("cat[]=3&subcat[]=9", TorznabCatType.AudioVideo, "Música/BD Remux 4K");
|
||||
|
||||
caps.Categories.AddCategoryMapping("cat[]=4&subcat[]=1", TorznabCatType.TVSD, "Series/DVD");
|
||||
caps.Categories.AddCategoryMapping("cat[]=4&subcat[]=2", TorznabCatType.TVSD, "Series/BDVD + Autorías");
|
||||
caps.Categories.AddCategoryMapping("cat[]=4&subcat[]=3", TorznabCatType.TVHD, "Series/BD");
|
||||
caps.Categories.AddCategoryMapping("cat[]=4&subcat[]=4", TorznabCatType.TVUHD, "Series/BD 4K");
|
||||
caps.Categories.AddCategoryMapping("cat[]=4&subcat[]=5", TorznabCatType.TVOther, "Series/BD 3D");
|
||||
caps.Categories.AddCategoryMapping("cat[]=4&subcat[]=6", TorznabCatType.TVHD, "Series/BD Remux");
|
||||
caps.Categories.AddCategoryMapping("cat[]=4&subcat[]=7", TorznabCatType.TVHD, "Series/MKV");
|
||||
caps.Categories.AddCategoryMapping("cat[]=4&subcat[]=8", TorznabCatType.TVUHD, "Series/MKV 4K");
|
||||
caps.Categories.AddCategoryMapping("cat[]=4&subcat[]=9", TorznabCatType.TVUHD, "Series/BD Remux 4K");
|
||||
|
||||
caps.Categories.AddCategoryMapping("cat[]=5&subcat[]=1", TorznabCatType.TVDocumentary, "Docus/DVD");
|
||||
caps.Categories.AddCategoryMapping("cat[]=5&subcat[]=2", TorznabCatType.TVDocumentary, "Docus/BDVD + Autorías");
|
||||
caps.Categories.AddCategoryMapping("cat[]=5&subcat[]=3", TorznabCatType.TVDocumentary, "Docus/BD");
|
||||
caps.Categories.AddCategoryMapping("cat[]=5&subcat[]=4", TorznabCatType.TVDocumentary, "Docus/BD 4K");
|
||||
caps.Categories.AddCategoryMapping("cat[]=5&subcat[]=5", TorznabCatType.TVDocumentary, "Docus/BD 3D");
|
||||
caps.Categories.AddCategoryMapping("cat[]=5&subcat[]=6", TorznabCatType.TVDocumentary, "Docus/BD Remux");
|
||||
caps.Categories.AddCategoryMapping("cat[]=5&subcat[]=7", TorznabCatType.TVDocumentary, "Docus/MKV");
|
||||
caps.Categories.AddCategoryMapping("cat[]=5&subcat[]=8", TorznabCatType.TVDocumentary, "Docus/MKV 4K");
|
||||
caps.Categories.AddCategoryMapping("cat[]=5&subcat[]=9", TorznabCatType.TVDocumentary, "Docus/BD Remux 4K");
|
||||
|
||||
caps.Categories.AddCategoryMapping("cat[]=6&subcat[]=1", TorznabCatType.OtherMisc, "Deportes y Otros/DVD");
|
||||
caps.Categories.AddCategoryMapping("cat[]=6&subcat[]=2", TorznabCatType.OtherMisc, "Deportes y Otros/BDVD + Autorías");
|
||||
caps.Categories.AddCategoryMapping("cat[]=6&subcat[]=3", TorznabCatType.OtherMisc, "Deportes y Otros/BD");
|
||||
caps.Categories.AddCategoryMapping("cat[]=6&subcat[]=4", TorznabCatType.OtherMisc, "Deportes y Otros/BD 4K");
|
||||
caps.Categories.AddCategoryMapping("cat[]=6&subcat[]=5", TorznabCatType.OtherMisc, "Deportes y Otros/BD 3D");
|
||||
caps.Categories.AddCategoryMapping("cat[]=6&subcat[]=6", TorznabCatType.OtherMisc, "Deportes y Otros/BD Remux");
|
||||
caps.Categories.AddCategoryMapping("cat[]=6&subcat[]=7", TorznabCatType.OtherMisc, "Deportes y Otros/MKV");
|
||||
caps.Categories.AddCategoryMapping("cat[]=6&subcat[]=8", TorznabCatType.OtherMisc, "Deportes y Otros/MKV 4K");
|
||||
caps.Categories.AddCategoryMapping("cat[]=6&subcat[]=9", TorznabCatType.OtherMisc, "Deportes y Otros/BD Remux 4K");
|
||||
|
||||
return caps;
|
||||
}
|
||||
|
||||
public override async Task<IndexerConfigurationStatus> ApplyConfiguration(JToken configJson)
|
||||
{
|
||||
LoadValuesFromJson(configJson);
|
||||
try
|
||||
{
|
||||
await DoLogin();
|
||||
var results = await PerformQuery(new TorznabQuery());
|
||||
if (!results.Any())
|
||||
throw new Exception("Found 0 results in the tracker");
|
||||
|
||||
IsConfigured = true;
|
||||
SaveConfig();
|
||||
return IndexerConfigurationStatus.Completed;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
IsConfigured = false;
|
||||
throw new Exception("Login error: " + e.Message);
|
||||
}
|
||||
}
|
||||
|
||||
protected override async Task<IEnumerable<ReleaseInfo>> PerformQuery(TorznabQuery query)
|
||||
{
|
||||
var releases = new List<ReleaseInfo>();
|
||||
|
||||
var qc = new NameValueCollection
|
||||
{
|
||||
{"page", "torrents"},
|
||||
{"search", query.GetQueryString()},
|
||||
{"active", "0"}
|
||||
};
|
||||
var searchUrl = SearchUrl + "?" + qc.GetQueryString();
|
||||
|
||||
foreach (var cat in MapTorznabCapsToTrackers(query)) // categories are already encoded
|
||||
searchUrl += "&" + cat;
|
||||
|
||||
var response = await RequestWithCookiesAsync(searchUrl);
|
||||
var results = response.ContentString;
|
||||
if (results == null || !results.Contains("/index.php?action=logout;"))
|
||||
{
|
||||
logger.Info("ZonaQ re-login");
|
||||
await DoLogin(); // re-login
|
||||
response = await RequestWithCookiesAsync(searchUrl);
|
||||
results = response.ContentString;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
var parser = new HtmlParser();
|
||||
using var doc = parser.ParseDocument(results);
|
||||
|
||||
var rows = doc.QuerySelectorAll("table.torrent_list > tbody > tr");
|
||||
foreach (var row in rows.Skip(1))
|
||||
{
|
||||
var qTitleLink = row.QuerySelector("a[href*=\"?page=torrent-details\"]");
|
||||
if (qTitleLink == null) // no results
|
||||
continue;
|
||||
|
||||
var title = qTitleLink.TextContent.Trim();
|
||||
title += " SPANiSH"; // fix for Radarr
|
||||
title = Regex.Replace(title, "4k", "2160p", RegexOptions.IgnoreCase);
|
||||
|
||||
var detailsStr = qTitleLink.GetAttribute("href");
|
||||
var details = new Uri(detailsStr);
|
||||
var link = new Uri(detailsStr.Replace("/index.php?page=torrent-details&", "/download.php?"));
|
||||
var qPoster = qTitleLink.GetAttribute("title");
|
||||
var poster = qPoster != null ? new Uri(qPoster) : null;
|
||||
|
||||
var publishDateStr = row.Children[4].InnerHtml.Split('>').Last();
|
||||
var publishDate = DateTime.ParseExact(publishDateStr, "dd/MM/yyyy", CultureInfo.InvariantCulture);
|
||||
var size = ParseUtil.GetBytes(row.Children[5].TextContent);
|
||||
var seeders = ParseUtil.CoerceInt(row.Children[6].TextContent);
|
||||
var leechers = ParseUtil.CoerceInt(row.Children[7].TextContent);
|
||||
var grabs = ParseUtil.CoerceInt(row.Children[8].TextContent);
|
||||
|
||||
var cat1 = row.Children[0].FirstElementChild.GetAttribute("href").Split('=').Last();
|
||||
var cat2 = row.Children[1].FirstElementChild.GetAttribute("href").Split('=').Last();
|
||||
var cat = MapTrackerCatToNewznab($"cat[]={cat1}&subcat[]={cat2}");
|
||||
|
||||
var dlVolumeFactor = row.QuerySelector("img[src*=\"/gold.png\"]") != null ? 0 :
|
||||
row.QuerySelector("img[src*=\"/silver.png\"]") != null ? 0.5 : 1;
|
||||
var ulVolumeFactor = row.QuerySelector("img[src*=\"/por3.gif\"]") != null ? 3 :
|
||||
row.QuerySelector("img[src*=\"/por2.gif\"]") != null ? 2 : 1;
|
||||
|
||||
var release = new ReleaseInfo
|
||||
{
|
||||
Title = title,
|
||||
Details = details,
|
||||
Guid = details,
|
||||
Link = link,
|
||||
PublishDate = publishDate,
|
||||
Poster = poster,
|
||||
Category = cat,
|
||||
Size = size,
|
||||
Grabs = grabs,
|
||||
Seeders = seeders,
|
||||
Peers = seeders + leechers,
|
||||
DownloadVolumeFactor = dlVolumeFactor,
|
||||
UploadVolumeFactor = ulVolumeFactor,
|
||||
MinimumRatio = 1,
|
||||
MinimumSeedTime = 259200 // 72 hours
|
||||
};
|
||||
|
||||
releases.Add(release);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
OnParseError(results, ex);
|
||||
}
|
||||
|
||||
return releases;
|
||||
}
|
||||
|
||||
private async Task DoLogin()
|
||||
{
|
||||
// The first page set the cookies and the session_id
|
||||
CookieHeader = "";
|
||||
var result = await RequestWithCookiesAsync(Login1Url, "");
|
||||
var parser = new HtmlParser();
|
||||
using var dom = parser.ParseDocument(result.ContentString);
|
||||
var sessionId = dom.QuerySelector("input#session_id")?.GetAttribute("value");
|
||||
if (string.IsNullOrWhiteSpace(sessionId))
|
||||
throw new ExceptionWithConfigData("Error getting the Session ID", configData);
|
||||
|
||||
await Task.Delay(3000);
|
||||
|
||||
// The second page send the login with the hash
|
||||
// The hash is reverse engineering from https://www.zonaq.pw/retorno/2/smf/Themes/smf_ZQ/scripts/script.js
|
||||
// doForm.hash_passwrd.value = hex_sha1(hex_sha1(doForm.user.value.php_to8bit().php_strtolower() + doForm.passwrd.value.php_to8bit()) + cur_session_id);
|
||||
var hashPassword = $"{(configData.Username.Value.ToLowerInvariant() + configData.Password.Value).SHA1Hash()}{sessionId}".SHA1Hash();
|
||||
|
||||
var pairs = new Dictionary<string, string> {
|
||||
{ "user", configData.Username.Value },
|
||||
{ "passwrd", configData.Password.Value },
|
||||
{ "hash_passwrd", hashPassword }
|
||||
};
|
||||
var headers = new Dictionary<string, string>
|
||||
{
|
||||
{"X-Requested-With", "XMLHttpRequest"}
|
||||
};
|
||||
result = await RequestWithCookiesAsync(Login2Url, method: RequestType.POST, data: pairs, headers: headers);
|
||||
var message = JObject.Parse(result.ContentString)["msg"]?.ToString();
|
||||
if (message == "puerta_2")
|
||||
{
|
||||
// The third page sets the cookie duration
|
||||
Thread.Sleep(3000);
|
||||
pairs = new Dictionary<string, string> {
|
||||
{ "passwd", "" },
|
||||
{ "cookielength", "43200" }, // 1 month
|
||||
{ "respuesta", "" }
|
||||
};
|
||||
result = await RequestWithCookiesAsync(Login3Url, method: RequestType.POST, data: pairs, headers: headers);
|
||||
message = JObject.Parse(result.ContentString)["msg"]?.ToString();
|
||||
}
|
||||
if (message != "last_door")
|
||||
throw new ExceptionWithConfigData($"Login error: {message}", configData);
|
||||
|
||||
// The forth page sets the last cookie
|
||||
Thread.Sleep(3000);
|
||||
await RequestWithCookiesAsync(Login4Url);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user