mirror of
https://github.com/Jackett/Jackett
synced 2025-02-24 23:22:46 +00:00
Fix for ThePirateBay
This commit is contained in:
parent
2f680840a7
commit
7289d763ef
1 changed files with 6 additions and 3 deletions
|
@ -30,6 +30,7 @@ namespace Jackett.Indexers
|
|||
}
|
||||
|
||||
private string SearchUrl { get { return BaseUri + "search/{0}/0/99/208,205"; } }
|
||||
private string RecentUrl { get { return BaseUri + "recent"; } }
|
||||
|
||||
new ConfigurationDataUrl configData
|
||||
{
|
||||
|
@ -79,7 +80,7 @@ namespace Jackett.Indexers
|
|||
{
|
||||
var releases = new List<ReleaseInfo>();
|
||||
var queryStr = HttpUtility.UrlEncode(query.GetQueryString());
|
||||
var episodeSearchUrl = string.Format(SearchUrl, queryStr);
|
||||
var episodeSearchUrl = string.IsNullOrWhiteSpace(queryStr) ? RecentUrl : string.Format(SearchUrl, queryStr);
|
||||
var response = await RequestStringWithCookiesAndRetry(episodeSearchUrl, string.Empty);
|
||||
|
||||
try
|
||||
|
@ -89,8 +90,10 @@ namespace Jackett.Indexers
|
|||
var rows = dom["#searchResult > tbody > tr"];
|
||||
foreach (var row in rows)
|
||||
{
|
||||
var release = new ReleaseInfo();
|
||||
if (row.ChildElements.Count() < 2)
|
||||
continue;
|
||||
|
||||
var release = new ReleaseInfo();
|
||||
CQ qRow = row.Cq();
|
||||
CQ qLink = qRow.Find(".detName > .detLink").First();
|
||||
|
||||
|
@ -110,7 +113,7 @@ namespace Jackett.Indexers
|
|||
|
||||
var timeString = descParts[0].Split(' ')[1];
|
||||
|
||||
if (timeString.Contains("mins ago"))
|
||||
if (timeString.Contains(" ago"))
|
||||
{
|
||||
release.PublishDate = (DateTime.Now - TimeSpan.FromMinutes(ParseUtil.CoerceInt(timeString.Split(' ')[0])));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue