mejortorrent: update download link. resolves #9296

This commit is contained in:
Garfield69
2020-08-05 20:24:45 +12:00
parent 1e5ef0f48a
commit 700e309405

View File

@@ -112,8 +112,7 @@ namespace Jackett.Common.Indexers
if (result.Status != HttpStatusCode.OK) if (result.Status != HttpStatusCode.OK)
throw new ExceptionWithConfigData(result.Content, configData); throw new ExceptionWithConfigData(result.Content, configData);
dom = parser.ParseDocument(result.Content); dom = parser.ParseDocument(result.Content);
var onClickParts = dom.QuerySelector("a[onclick*=\"/torrent\"]").GetAttribute("onclick").Split('\''); downloadUrl = SiteLink + dom.QuerySelector("a[href^=\"/tor/\"]").GetAttribute("href");
downloadUrl = $"{SiteLink}tor/{onClickParts[3]}/{onClickParts[5]}";
// Eg https://www.mejortorrentt.net/tor/peliculas/Harry_Potter_1_y_la_Piedra_Filosofal_MicroHD_1080p.torrent // Eg https://www.mejortorrentt.net/tor/peliculas/Harry_Potter_1_y_la_Piedra_Filosofal_MicroHD_1080p.torrent
var content = await base.Download(new Uri(downloadUrl)); var content = await base.Download(new Uri(downloadUrl));