Cardigann: add followredirect option to search paths

This commit is contained in:
kaso17 2018-12-01 14:19:50 +01:00
parent a4053d914a
commit fe4a5f82b1
2 changed files with 10 additions and 0 deletions

View File

@ -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);
}

View File

@ -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