mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-04-24 22:07:32 -04:00
Fixed: (Cardigann) Use cookies from captcha response
This commit is contained in:
parent
972ee8f6a9
commit
ab5b799ecf
1 changed files with 6 additions and 1 deletions
|
@ -666,7 +666,7 @@ namespace NzbDrone.Core.Indexers.Cardigann
|
|||
var captchaUrl = ResolvePath(captchaElement.GetAttribute("src"), loginUrl);
|
||||
|
||||
var request = new HttpRequestBuilder(captchaUrl.ToString())
|
||||
.SetCookies(landingResult.GetCookies())
|
||||
.SetCookies(Cookies ?? new Dictionary<string, string>())
|
||||
.SetHeaders(headers ?? new Dictionary<string, string>())
|
||||
.SetHeader("Referer", loginUrl.AbsoluteUri)
|
||||
.SetEncoding(_encoding)
|
||||
|
@ -675,6 +675,11 @@ namespace NzbDrone.Core.Indexers.Cardigann
|
|||
|
||||
var response = await HttpClient.ExecuteProxiedAsync(request, Definition);
|
||||
|
||||
if (response.GetCookies().Any())
|
||||
{
|
||||
Cookies = response.GetCookies();
|
||||
}
|
||||
|
||||
return new Captcha
|
||||
{
|
||||
ContentType = response.Headers.ContentType,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue