mirror of
https://github.com/Prowlarr/Prowlarr
synced 2026-05-09 05:22:09 +02:00
Search works for first result, but not parsed yet
This commit is contained in:
parent
2aac151112
commit
e7d2f8c081
1 changed files with 8 additions and 6 deletions
|
|
@ -61,6 +61,11 @@ public override IParseIndexerResponse GetParser()
|
|||
return new LostfilmParser(Settings, Capabilities.Categories) { HttpClient = _httpClient, Logger = _logger, Definition = Definition, Indexer = this };
|
||||
}
|
||||
|
||||
public IDictionary<string, string> GetCookiesPublic()
|
||||
{
|
||||
return GetCookies();
|
||||
}
|
||||
|
||||
protected override async Task DoLogin()
|
||||
{
|
||||
UpdateCookies(null, null);
|
||||
|
|
@ -220,8 +225,6 @@ private IList<string> GetSearchPageURLs(string term, int? season, string episode
|
|||
// Keywords count related to Series Filter.
|
||||
var serieFilterKeywords = 0;
|
||||
|
||||
Logger.Info(searchKeywords);
|
||||
|
||||
// Overall (keywords.count - searchKeywords - serieFilterKeywords) are related to episode filter
|
||||
do
|
||||
{
|
||||
|
|
@ -233,8 +236,6 @@ private IList<string> GetSearchPageURLs(string term, int? season, string episode
|
|||
{ "val", searchString }
|
||||
};
|
||||
|
||||
Logger.Info(data);
|
||||
|
||||
var requestBuilder = new HttpRequestBuilder(Settings.BaseUrl + "ajaxik.php")
|
||||
{
|
||||
Method = HttpMethod.Post
|
||||
|
|
@ -245,7 +246,7 @@ private IList<string> GetSearchPageURLs(string term, int? season, string episode
|
|||
}
|
||||
|
||||
requestBuilder.PostProcess += r => r.RequestTimeout = TimeSpan.FromSeconds(15);
|
||||
requestBuilder.SetCookies(Indexer.Cookies);
|
||||
requestBuilder.SetCookies(Indexer.GetCookiesPublic());
|
||||
var req = new IndexerRequest(requestBuilder.Build());
|
||||
var response = new IndexerResponse(req, HttpClient.ExecuteProxied(req.HttpRequest, Definition));
|
||||
|
||||
|
|
@ -328,6 +329,7 @@ private IEnumerable<IndexerRequest> GetPagedRequests(string term, int[] categori
|
|||
requestUrls.AddRange(GetSearchPageURLs(term, season, episode));
|
||||
}
|
||||
|
||||
Logger.Info(requestUrls.Count());
|
||||
foreach (var url in requestUrls)
|
||||
{
|
||||
yield return new IndexerRequest(url, HttpAccept.Html);
|
||||
|
|
@ -541,7 +543,7 @@ private IList<TorrentInfo> FetchTrackerReleases(TrackerUrlDetails details)
|
|||
AllowAutoRedirect = true,
|
||||
};
|
||||
requestBuilder.PostProcess += r => r.RequestTimeout = TimeSpan.FromSeconds(15);
|
||||
requestBuilder.SetCookies(Indexer.Cookies);
|
||||
requestBuilder.SetCookies(Indexer.GetCookiesPublic());
|
||||
var req = new IndexerRequest(requestBuilder.Build());
|
||||
var results = new IndexerResponse(req, HttpClient.ExecuteProxied(req.HttpRequest, Definition));
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue