From 245855c2abc463ad8b58d04b49aa0a340556320d Mon Sep 17 00:00:00 2001 From: kaso17 Date: Sun, 4 Dec 2016 20:37:36 +0100 Subject: [PATCH] DanishBits: Fix DL link (#798) --- src/Jackett/Indexers/DanishBits.cs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/Jackett/Indexers/DanishBits.cs b/src/Jackett/Indexers/DanishBits.cs index c34dddafc..ae98870a9 100644 --- a/src/Jackett/Indexers/DanishBits.cs +++ b/src/Jackett/Indexers/DanishBits.cs @@ -232,12 +232,9 @@ namespace Jackett.Indexers var title = titleAnchor.GetAttribute("title"); release.Title = title; - var dlUrlAnchor = qRow.Find("span.right a").FirstElement(); + var dlUrlAnchor = qRow.Find("span.right a[title=\"Direkte download link\"]").FirstElement(); var dlUrl = dlUrlAnchor.GetAttribute("href"); - var authkey = Regex.Match(dlUrl, "authkey=(?[0-9a-zA-Z]+)").Groups["authkey"].Value; - var torrentPass = Regex.Match(dlUrl, "torrent_pass=(?[0-9a-zA-Z]+)").Groups["torrent_pass"].Value; - var torrentId = Regex.Match(dlUrl, "id=(?[0-9]+)").Groups["id"].Value; - release.Link = new Uri($"{SearchUrl}/{title}.torrent/?action=download&authkey={authkey}&torrent_pass={torrentPass}&id={torrentId}"); + release.Link = new Uri(SiteLink + dlUrl); var torrentLink = titleAnchor.GetAttribute("href"); release.Guid = new Uri(SiteLink + torrentLink); @@ -272,7 +269,7 @@ namespace Jackett.Indexers var Grabs = qRow.Find("td:nth-child(6)"); release.Grabs = ParseUtil.CoerceLong(Grabs.Text()); - if (qRow.Find("img[src=\"/static/common/torrents/gratis.png\"]").Length >= 1) + if (qRow.Find("span.freeleech, img[src=\"/static/common/torrents/gratis.png\"]").Length >= 1) release.DownloadVolumeFactor = 0; else release.DownloadVolumeFactor = 1;