mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
SpeedCd: Update parsing
This commit is contained in:
@@ -147,18 +147,19 @@ namespace Jackett.Common.Indexers
|
|||||||
CQ torrentData = row.OuterHTML;
|
CQ torrentData = row.OuterHTML;
|
||||||
CQ cells = row.Cq().Find("td");
|
CQ cells = row.Cq().Find("td");
|
||||||
|
|
||||||
string title = torrentData.Find("a[class='torrent']").First().Text().Trim();
|
string title = torrentData.Find("td[class='lft'] > div > a").First().Text().Trim();
|
||||||
Uri link = new Uri(SiteLink + torrentData.Find("img[class='icos save']").First().Parent().Attr("href").Trim());
|
Uri link = new Uri(SiteLink + torrentData.Find("img[title='Download']").First().Parent().Attr("href").Trim());
|
||||||
Uri guid = new Uri(SiteLink + torrentData.Find("a[class='torrent']").First().Attr("href").Trim().TrimStart('/'));
|
Uri guid = link;
|
||||||
long size = ReleaseInfo.GetBytes(cells.Elements.ElementAt(4).Cq().Text());
|
long size = ReleaseInfo.GetBytes(cells.Elements.ElementAt(4).Cq().Text());
|
||||||
int seeders = ParseUtil.CoerceInt(cells.Elements.ElementAt(5).Cq().Text());
|
int grabs = ParseUtil.CoerceInt(cells.Elements.ElementAt(5).Cq().Text());
|
||||||
int leechers = ParseUtil.CoerceInt(cells.Elements.ElementAt(6).Cq().Text());
|
int seeders = ParseUtil.CoerceInt(cells.Elements.ElementAt(6).Cq().Text());
|
||||||
|
int leechers = ParseUtil.CoerceInt(cells.Elements.ElementAt(7).Cq().Text());
|
||||||
|
|
||||||
string pubDateStr = torrentData.Find("span[class^='elapsedDate']").First().Attr("title").Trim().Replace(" at", "");
|
string pubDateStr = torrentData.Find("span[class^='elapsedDate']").First().Attr("title").Trim().Replace(" at", "");
|
||||||
DateTime publishDate = DateTime.ParseExact(pubDateStr, "dddd, MMMM d, yyyy h:mmtt", CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal).ToLocalTime();
|
DateTime publishDate = DateTime.ParseExact(pubDateStr, "dddd, MMMM d, yyyy h:mmtt", CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal).ToLocalTime();
|
||||||
|
|
||||||
long category = 0;
|
long category = 0;
|
||||||
string cat = torrentData.Find("a[class='cat']").First().Attr("id").Trim();
|
string cat = torrentData.Find("img[class^='Tcat']").First().Parent().Attr("href").Trim().Remove(0, 5);
|
||||||
long.TryParse(cat, out category);
|
long.TryParse(cat, out category);
|
||||||
|
|
||||||
var release = new ReleaseInfo();
|
var release = new ReleaseInfo();
|
||||||
@@ -168,6 +169,7 @@ namespace Jackett.Common.Indexers
|
|||||||
release.Link = link;
|
release.Link = link;
|
||||||
release.PublishDate = publishDate;
|
release.PublishDate = publishDate;
|
||||||
release.Size = size;
|
release.Size = size;
|
||||||
|
release.Grabs = grabs;
|
||||||
release.Seeders = seeders;
|
release.Seeders = seeders;
|
||||||
release.Peers = seeders + leechers;
|
release.Peers = seeders + leechers;
|
||||||
release.MinimumRatio = 1;
|
release.MinimumRatio = 1;
|
||||||
|
Reference in New Issue
Block a user