mirror of https://github.com/Jackett/Jackett
* files column removed * fix date parsing * include first results * add uploader into description
This commit is contained in:
parent
60af4a04d3
commit
13fc916177
|
@ -207,7 +207,7 @@ namespace Jackett.Common.Indexers
|
||||||
var doc = parser.ParseDocument(results);
|
var doc = parser.ParseDocument(results);
|
||||||
|
|
||||||
var rows = doc.QuerySelectorAll("table[id='torrents'] > tbody > tr");
|
var rows = doc.QuerySelectorAll("table[id='torrents'] > tbody > tr");
|
||||||
foreach (var row in rows.Skip(1))
|
foreach (var row in rows)
|
||||||
{
|
{
|
||||||
var qTitleLink = row.QuerySelector("a.hv");
|
var qTitleLink = row.QuerySelector("a.hv");
|
||||||
if (qTitleLink == null) // no results
|
if (qTitleLink == null) // no results
|
||||||
|
@ -221,8 +221,10 @@ namespace Jackett.Common.Indexers
|
||||||
var link = new Uri(SiteLink + qLink.GetAttribute("href").TrimStart('/'));
|
var link = new Uri(SiteLink + qLink.GetAttribute("href").TrimStart('/'));
|
||||||
|
|
||||||
var descrSplit = row.QuerySelector("div.sub").TextContent.Split('|');
|
var descrSplit = row.QuerySelector("div.sub").TextContent.Split('|');
|
||||||
var publishDate = DateTimeUtil.FromTimeAgo(descrSplit.Last());
|
var dateSplit = descrSplit.Last().Split(new [] {" by "}, StringSplitOptions.None);
|
||||||
|
var publishDate = DateTimeUtil.FromTimeAgo(dateSplit.First());
|
||||||
var description = descrSplit.Length > 1 ? "Tags: " + descrSplit.First().Trim() : "";
|
var description = descrSplit.Length > 1 ? "Tags: " + descrSplit.First().Trim() : "";
|
||||||
|
description += dateSplit.Length > 1 ? " Uploaded by: " + dateSplit.Last().Trim() : "";
|
||||||
|
|
||||||
var catIcon = row.QuerySelector("td:nth-of-type(1) a");
|
var catIcon = row.QuerySelector("td:nth-of-type(1) a");
|
||||||
if (catIcon == null)
|
if (catIcon == null)
|
||||||
|
@ -233,10 +235,9 @@ namespace Jackett.Common.Indexers
|
||||||
var cat = MapTrackerCatToNewznab(catIcon.GetAttribute("href").Substring(1));
|
var cat = MapTrackerCatToNewznab(catIcon.GetAttribute("href").Substring(1));
|
||||||
|
|
||||||
var size = ReleaseInfo.GetBytes(row.Children[5].TextContent);
|
var size = ReleaseInfo.GetBytes(row.Children[5].TextContent);
|
||||||
var files = ParseUtil.CoerceInt(row.Children[6].TextContent.Replace("Go to files", ""));
|
var grabs = ParseUtil.CoerceInt(row.Children[6].TextContent);
|
||||||
var grabs = ParseUtil.CoerceInt(row.Children[7].TextContent);
|
var seeders = ParseUtil.CoerceInt(row.Children[7].TextContent);
|
||||||
var seeders = ParseUtil.CoerceInt(row.Children[8].TextContent);
|
var leechers = ParseUtil.CoerceInt(row.Children[8].TextContent);
|
||||||
var leechers = ParseUtil.CoerceInt(row.Children[9].TextContent);
|
|
||||||
var dlVolumeFactor = row.QuerySelector("span.free") != null ? 0 : 1;
|
var dlVolumeFactor = row.QuerySelector("span.free") != null ? 0 : 1;
|
||||||
|
|
||||||
var release = new ReleaseInfo
|
var release = new ReleaseInfo
|
||||||
|
@ -249,7 +250,6 @@ namespace Jackett.Common.Indexers
|
||||||
Category = cat,
|
Category = cat,
|
||||||
Description = description,
|
Description = description,
|
||||||
Size = size,
|
Size = size,
|
||||||
Files = files,
|
|
||||||
Grabs = grabs,
|
Grabs = grabs,
|
||||||
Seeders = seeders,
|
Seeders = seeders,
|
||||||
Peers = seeders + leechers,
|
Peers = seeders + leechers,
|
||||||
|
|
Loading…
Reference in New Issue