Skip to content

Commit

Permalink
cinecalidad: fix download link (Jackett#10318)
Browse files Browse the repository at this point in the history
  • Loading branch information
ngosang authored Nov 28, 2020
1 parent eeb51c7 commit 5547bf6
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/Jackett.Common/Indexers/Cinecalidad.cs
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,16 @@ public override async Task<byte[]> Download(Uri link)
{
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));
Expand Down

0 comments on commit 5547bf6

Please sign in to comment.