Private GIT

Skip to content
Snippets Groups Projects
Commit 2f682ca5 authored by flightlevel's avatar flightlevel
Browse files

SpeedCd: Fix Query String

SpeedCd: Fix Query String
parent 7b74f981
No related branches found
No related tags found
No related merge requests found
...@@ -92,9 +92,9 @@ namespace Jackett.Indexers ...@@ -92,9 +92,9 @@ namespace Jackett.Indexers
NameValueCollection qParams = new NameValueCollection(); NameValueCollection qParams = new NameValueCollection();
if (!string.IsNullOrEmpty(query.SanitizedSearchTerm)) if (!string.IsNullOrEmpty(query.GetQueryString()))
{ {
qParams.Add("search", query.SanitizedSearchTerm); qParams.Add("search", query.GetQueryString());
} }
List<string> catList = MapTorznabCapsToTrackers(query); List<string> catList = MapTorznabCapsToTrackers(query);
...@@ -113,7 +113,6 @@ namespace Jackett.Indexers ...@@ -113,7 +113,6 @@ namespace Jackett.Indexers
try try
{ {
CQ dom = response.Content; CQ dom = response.Content;
var rows = dom["div[id='torrentTable'] > div[class='box torrentBox'] > div[class='boxContent'] > table > tbody > tr"]; var rows = dom["div[id='torrentTable'] > div[class='box torrentBox'] > div[class='boxContent'] > table > tbody > tr"];
...@@ -125,27 +124,9 @@ namespace Jackett.Indexers ...@@ -125,27 +124,9 @@ namespace Jackett.Indexers
string title = torrentData.Find("a[class='torrent']").First().Text().Trim(); string title = torrentData.Find("a[class='torrent']").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[class='icos save']").First().Parent().Attr("href").Trim());
Uri guid = new Uri(SiteLink + torrentData.Find("a[class='torrent']").First().Attr("href").Trim().TrimStart('/')); Uri guid = new Uri(SiteLink + torrentData.Find("a[class='torrent']").First().Attr("href").Trim().TrimStart('/'));
long size = ReleaseInfo.GetBytes(cells.Elements.ElementAt(4).InnerText); long size = ReleaseInfo.GetBytes(cells.Elements.ElementAt(4).Cq().Text());
int seeders = ParseUtil.CoerceInt(cells.Elements.ElementAt(5).Cq().Text());
int seeders = 0; int leechers = ParseUtil.CoerceInt(cells.Elements.ElementAt(6).Cq().Text());
if (cells.Elements.ElementAt(5).FirstChild.HasChildren)
{
seeders = ParseUtil.CoerceInt(cells.Elements.ElementAt(5).FirstChild.InnerText);
}
else
{
seeders = ParseUtil.CoerceInt(cells.Elements.ElementAt(5).InnerText);
};
int leechers = 0;
if (cells.Elements.ElementAt(6).FirstChild.HasChildren)
{
leechers = ParseUtil.CoerceInt(cells.Elements.ElementAt(6).FirstChild.InnerText);
}
else
{
leechers = ParseUtil.CoerceInt(cells.Elements.ElementAt(6).InnerText);
}
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();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment