1
0
Fork 0
mirror of https://github.com/Jackett/Jackett synced 2025-03-06 11:48:49 +00:00

cinecalidad: fix download link (#10318)

This commit is contained in:
Diego Heras 2020-11-28 21:40:10 +01:00 committed by GitHub
parent eeb51c7e63
commit 5547bf6a03
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -128,10 +128,16 @@ namespace Jackett.Common.Indexers
{
var parser = new HtmlParser();
var dom = parser.ParseDocument(results.ContentString);
var preotectedLink = dom.QuerySelector("a[service=BitTorrent]").GetAttribute("href");
preotectedLink = SiteLink + preotectedLink.TrimStart('/');
var protectedLink = dom.QuerySelector("a[service=BitTorrent]").GetAttribute("href");
if (protectedLink.Contains("/ouo.io/"))
{
// protected link =>
// https://ouo.io/qs/qsW6rCh4?s=https://www.cinecalidad.is/protect/v2.php?i=A8--9InL&title=High+Life+%282018%29
var linkParts = protectedLink.Split('=');
protectedLink = protectedLink.Replace(linkParts[0] + "=", "");
}
results = await RequestWithCookiesAsync(preotectedLink);
results = await RequestWithCookiesAsync(protectedLink);
dom = parser.ParseDocument(results.ContentString);
var magnetUrl = dom.QuerySelector("a[href^=magnet]").GetAttribute("href");
return await base.Download(new Uri(magnetUrl));