From d55316a70a5ebdb5fbe1be80ed4eb15bd11fbe8c Mon Sep 17 00:00:00 2001 From: Qstick Date: Sat, 20 Feb 2021 02:50:59 -0500 Subject: [PATCH] Spoof referer for AnimeTorrents --- src/NzbDrone.Core/Indexers/Definitions/AnimeTorrents.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/NzbDrone.Core/Indexers/Definitions/AnimeTorrents.cs b/src/NzbDrone.Core/Indexers/Definitions/AnimeTorrents.cs index 841e90e2d..9ad462554 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/AnimeTorrents.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/AnimeTorrents.cs @@ -141,6 +141,7 @@ namespace NzbDrone.Core.Indexers.Definitions var replaceRegex = new Regex("[^a-zA-Z0-9]+"); searchString = replaceRegex.Replace(searchString, "%"); var searchUrl = BaseUrl + "ajax/torrents_data.php"; + var searchUrlReferer = BaseUrl + "torrents.php?cat=0&searchin=filename&search="; var queryCollection = new NameValueCollection { @@ -155,7 +156,8 @@ namespace NzbDrone.Core.Indexers.Definitions var extraHeaders = new NameValueCollection { - { "X-Requested-With", "XMLHttpRequest" } + { "X-Requested-With", "XMLHttpRequest" }, + { "Referer", searchUrlReferer } }; var request = new IndexerRequest(searchUrl, HttpAccept.Html);