New: Added CAPTCHA support to Rarbg.

This commit is contained in:
Taloth Saldono
2016-08-10 20:45:48 +02:00
parent e9eab0ae48
commit 73fb216e6f
36 changed files with 458 additions and 130 deletions

View File

@@ -8,6 +8,7 @@ using NzbDrone.Common.Extensions;
using NzbDrone.Common.Http;
using NzbDrone.Common.TPL;
using NzbDrone.Core.Configuration;
using NzbDrone.Core.Http.CloudFlare;
using NzbDrone.Core.Indexers.Exceptions;
using NzbDrone.Core.IndexerSearch.Definitions;
using NzbDrone.Core.Parser;
@@ -21,7 +22,7 @@ namespace NzbDrone.Core.Indexers
{
protected const int MaxNumResultsPerQuery = 1000;
private readonly IHttpClient _httpClient;
protected readonly IHttpClient _httpClient;
public override bool SupportsRss { get { return true; } }
public override bool SupportsSearch { get { return true; } }
@@ -313,6 +314,10 @@ namespace NzbDrone.Core.Indexers
{
_logger.Warn("Request limit reached");
}
catch (CloudFlareCaptchaException)
{
return new ValidationFailure("CaptchaToken", "Site protected by CloudFlare CAPTCHA. Valid CAPTCHA token required.");
}
catch (UnsupportedFeedException ex)
{
_logger.Warn(ex, "Indexer feed is not supported");