mirror of
https://github.com/Jackett/Jackett.git
synced 2025-10-02 08:34:32 +02:00
Cardigann: add followredirect option to search paths
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user