cinecalidad: fix link parsing (#12023)

This commit is contained in:
Diego Heras 2021-07-13 07:15:15 +02:00 committed by GitHub
parent ea3c49be44
commit 4073f65326
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 7 deletions

View File

@ -13,7 +13,6 @@ using Jackett.Common.Services.Interfaces;
using Jackett.Common.Utils.Clients; using Jackett.Common.Utils.Clients;
using Newtonsoft.Json.Linq; using Newtonsoft.Json.Linq;
using NLog; using NLog;
using static Jackett.Common.Models.IndexerConfig.ConfigurationData;
using WebClient = Jackett.Common.Utils.Clients.WebClient; using WebClient = Jackett.Common.Utils.Clients.WebClient;
namespace Jackett.Common.Indexers namespace Jackett.Common.Indexers
@ -59,11 +58,6 @@ namespace Jackett.Common.Indexers
AddCategoryMapping(1, TorznabCatType.MoviesHD); AddCategoryMapping(1, TorznabCatType.MoviesHD);
} }
public override void LoadValuesFromJson(JToken jsonConfig, bool useProtectionService = false)
{
base.LoadValuesFromJson(jsonConfig, useProtectionService);
}
public override async Task<IndexerConfigurationStatus> ApplyConfiguration(JToken configJson) public override async Task<IndexerConfigurationStatus> ApplyConfiguration(JToken configJson)
{ {
LoadValuesFromJson(configJson); LoadValuesFromJson(configJson);
@ -165,7 +159,15 @@ namespace Jackett.Common.Indexers
var poster = new Uri(GetAbsoluteUrl(qImg.GetAttribute("src"))); var poster = new Uri(GetAbsoluteUrl(qImg.GetAttribute("src")));
var extract = row.QuerySelector("noscript").InnerHtml.Split('\''); var extract = row.QuerySelector("noscript").InnerHtml.Split('\'');
var link = new Uri(GetAbsoluteUrl(extract[1])); Uri link = null;
foreach (var part in extract)
{
if (part.StartsWith(SiteLink) && part.EndsWith("/"))
{
link = new Uri(GetAbsoluteUrl(part));
break;
}
}
var release = new ReleaseInfo var release = new ReleaseInfo
{ {