mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
DanishBits: Fix DL link (#798)
This commit is contained in:
@@ -232,12 +232,9 @@ namespace Jackett.Indexers
|
|||||||
var title = titleAnchor.GetAttribute("title");
|
var title = titleAnchor.GetAttribute("title");
|
||||||
release.Title = 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 dlUrl = dlUrlAnchor.GetAttribute("href");
|
||||||
var authkey = Regex.Match(dlUrl, "authkey=(?<authkey>[0-9a-zA-Z]+)").Groups["authkey"].Value;
|
release.Link = new Uri(SiteLink + dlUrl);
|
||||||
var torrentPass = Regex.Match(dlUrl, "torrent_pass=(?<torrent_pass>[0-9a-zA-Z]+)").Groups["torrent_pass"].Value;
|
|
||||||
var torrentId = Regex.Match(dlUrl, "id=(?<id>[0-9]+)").Groups["id"].Value;
|
|
||||||
release.Link = new Uri($"{SearchUrl}/{title}.torrent/?action=download&authkey={authkey}&torrent_pass={torrentPass}&id={torrentId}");
|
|
||||||
|
|
||||||
var torrentLink = titleAnchor.GetAttribute("href");
|
var torrentLink = titleAnchor.GetAttribute("href");
|
||||||
release.Guid = new Uri(SiteLink + torrentLink);
|
release.Guid = new Uri(SiteLink + torrentLink);
|
||||||
@@ -272,7 +269,7 @@ namespace Jackett.Indexers
|
|||||||
var Grabs = qRow.Find("td:nth-child(6)");
|
var Grabs = qRow.Find("td:nth-child(6)");
|
||||||
release.Grabs = ParseUtil.CoerceLong(Grabs.Text());
|
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;
|
release.DownloadVolumeFactor = 0;
|
||||||
else
|
else
|
||||||
release.DownloadVolumeFactor = 1;
|
release.DownloadVolumeFactor = 1;
|
||||||
|
Reference in New Issue
Block a user