1
0
Fork 0
mirror of https://github.com/Jackett/Jackett synced 2025-01-02 21:26:08 +00:00

erairaws: new rss token path + new invalid token detection. resolves #15687

This commit is contained in:
Garfield69 2024-11-05 19:37:51 +13:00
parent 07c1efa686
commit c705778ec3

View file

@ -35,7 +35,7 @@ namespace Jackett.Common.Indexers.Definitions
public override TorznabCapabilities TorznabCaps => SetCapabilities(); public override TorznabCapabilities TorznabCaps => SetCapabilities();
const string RSS_PATH = "feed/?type=magnet"; const string RSS_PATH = "feed/?type=magnet&token=";
public EraiRaws(IIndexerConfigurationService configService, Utils.Clients.WebClient wc, Logger l, public EraiRaws(IIndexerConfigurationService configService, Utils.Clients.WebClient wc, Logger l,
IProtectionService ps, ICacheService cs) IProtectionService ps, ICacheService cs)
@ -91,7 +91,7 @@ namespace Jackett.Common.Indexers.Definitions
private bool IsTitleDetailParsingEnabled => ((BoolConfigurationItem)configData.GetDynamic("title-detail-parsing")).Value; private bool IsTitleDetailParsingEnabled => ((BoolConfigurationItem)configData.GetDynamic("title-detail-parsing")).Value;
private bool IsSubsEnabled => ((BoolConfigurationItem)configData.GetDynamic("include-subs")).Value; private bool IsSubsEnabled => ((BoolConfigurationItem)configData.GetDynamic("include-subs")).Value;
public string RssFeedUri => SiteLink + RSS_PATH + "&" + RSSKey; public string RssFeedUri => SiteLink + RSS_PATH + RSSKey;
public override async Task<IndexerConfigurationStatus> ApplyConfiguration(JToken configJson) public override async Task<IndexerConfigurationStatus> ApplyConfiguration(JToken configJson)
{ {
@ -122,7 +122,7 @@ namespace Jackett.Common.Indexers.Definitions
var result = await RequestWithCookiesAndRetryAsync(RssFeedUri); var result = await RequestWithCookiesAndRetryAsync(RssFeedUri);
if (result.IsRedirect) if (result.IsRedirect)
result = await FollowIfRedirect(result); result = await FollowIfRedirect(result);
if (result.ContentString.Contains("403 Forbidden")) if (result.ContentString.Contains("<status>403</status>"))
{ {
logger.Error("[EraiRaws] 403 Forbidden"); logger.Error("[EraiRaws] 403 Forbidden");
throw new Exception("The RSSkey may need to be replaced as EraiRaws returned 403 Forbidden."); throw new Exception("The RSSkey may need to be replaced as EraiRaws returned 403 Forbidden.");