mirror of
https://github.com/Jackett/Jackett.git
synced 2025-10-02 16:42:01 +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);
|
response = await PostDataWithCookies(searchUrl, queryCollection, null, null, headers);
|
||||||
else
|
else
|
||||||
response = await RequestStringWithCookies(searchUrl, null, null, headers);
|
response = await RequestStringWithCookies(searchUrl, null, null, headers);
|
||||||
|
|
||||||
|
if (response.IsRedirect && SearchPath.Followredirect)
|
||||||
|
await FollowIfRedirect(response);
|
||||||
|
|
||||||
var results = response.Content;
|
var results = response.Content;
|
||||||
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var SearchResultParser = new HtmlParser();
|
var SearchResultParser = new HtmlParser();
|
||||||
@@ -1247,6 +1252,10 @@ namespace Jackett.Common.Indexers
|
|||||||
response = await PostDataWithCookies(searchUrl, queryCollection);
|
response = await PostDataWithCookies(searchUrl, queryCollection);
|
||||||
else
|
else
|
||||||
response = await RequestStringWithCookies(searchUrl);
|
response = await RequestStringWithCookies(searchUrl);
|
||||||
|
|
||||||
|
if (response.IsRedirect && SearchPath.Followredirect)
|
||||||
|
await FollowIfRedirect(response);
|
||||||
|
|
||||||
results = response.Content;
|
results = response.Content;
|
||||||
SearchResultDocument = SearchResultParser.Parse(results);
|
SearchResultDocument = SearchResultParser.Parse(results);
|
||||||
}
|
}
|
||||||
|
@@ -184,6 +184,7 @@ namespace Jackett.Common.Models
|
|||||||
{
|
{
|
||||||
public List<string> Categories { get; set; }
|
public List<string> Categories { get; set; }
|
||||||
public bool Inheritinputs { get; set; } = true;
|
public bool Inheritinputs { get; set; } = true;
|
||||||
|
public bool Followredirect { get; set; } = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class requestBlock
|
public class requestBlock
|
||||||
|
Reference in New Issue
Block a user