mirror of
https://github.com/Jackett/Jackett
synced 2025-02-24 23:22:46 +00:00
TorrentHeaven: Make captcha optional and fix login detection (#693)
This commit is contained in:
parent
cd1d30fc4f
commit
3f79aa62d9
1 changed files with 5 additions and 1 deletions
|
@ -98,6 +98,10 @@ namespace Jackett.Indexers
|
|||
var captchaImage = await RequestBytesWithCookies(CaptchaUrl, loginPage.Cookies);
|
||||
configData.CaptchaImage.Value = captchaImage.Content;
|
||||
}
|
||||
else
|
||||
{
|
||||
configData.CaptchaImage.Value = new byte[0];
|
||||
}
|
||||
configData.CaptchaCookie.Value = loginPage.Cookies;
|
||||
return configData;
|
||||
}
|
||||
|
@ -122,7 +126,7 @@ namespace Jackett.Indexers
|
|||
}
|
||||
|
||||
var result = await RequestLoginAndFollowRedirect(IndexUrl, pairs, configData.CaptchaCookie.Value, true, null, IndexUrl, true);
|
||||
if (result.Content == null || !result.Content.Contains("login_complete"))
|
||||
if (result.Content == null || (!result.Content.Contains("login_complete") && !result.Content.Contains("index.php?strWebValue=account&strWebAction=logout")))
|
||||
{
|
||||
CQ dom = result.Content;
|
||||
var errorMessage = dom["table > tbody > tr > td[valign=top][width=100%]"].Html();
|
||||
|
|
Loading…
Reference in a new issue