mirror of https://github.com/Jackett/Jackett
Cardigann: add followredirect option to search paths
This commit is contained in:
parent
a4053d914a
commit
fe4a5f82b1
|
@ -1227,8 +1227,13 @@ namespace Jackett.Common.Indexers
|
|||
response = await PostDataWithCookies(searchUrl, queryCollection, null, null, headers);
|
||||
else
|
||||
response = await RequestStringWithCookies(searchUrl, null, null, headers);
|
||||
|
||||
if (response.IsRedirect && SearchPath.Followredirect)
|
||||
await FollowIfRedirect(response);
|
||||
|
||||
var results = response.Content;
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
var SearchResultParser = new HtmlParser();
|
||||
|
@ -1247,6 +1252,10 @@ namespace Jackett.Common.Indexers
|
|||
response = await PostDataWithCookies(searchUrl, queryCollection);
|
||||
else
|
||||
response = await RequestStringWithCookies(searchUrl);
|
||||
|
||||
if (response.IsRedirect && SearchPath.Followredirect)
|
||||
await FollowIfRedirect(response);
|
||||
|
||||
results = response.Content;
|
||||
SearchResultDocument = SearchResultParser.Parse(results);
|
||||
}
|
||||
|
|
|
@ -184,6 +184,7 @@ namespace Jackett.Common.Models
|
|||
{
|
||||
public List<string> Categories { get; set; }
|
||||
public bool Inheritinputs { get; set; } = true;
|
||||
public bool Followredirect { get; set; } = false;
|
||||
}
|
||||
|
||||
public class requestBlock
|
||||
|
|
Loading…
Reference in New Issue