From fed41d5b68fcb521e4a6e0cf416c580324e5b2c1 Mon Sep 17 00:00:00 2001 From: Diego Heras Date: Mon, 16 Mar 2020 21:48:14 +0100 Subject: [PATCH] epublibre: add server overloaded message (#7697) --- src/Jackett.Common/Indexers/EpubLibre.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Jackett.Common/Indexers/EpubLibre.cs b/src/Jackett.Common/Indexers/EpubLibre.cs index 01e75df86..9958353d5 100644 --- a/src/Jackett.Common/Indexers/EpubLibre.cs +++ b/src/Jackett.Common/Indexers/EpubLibre.cs @@ -20,6 +20,7 @@ namespace Jackett.Common.Indexers public class EpubLibre : BaseWebIndexer { private string SearchUrl => SiteLink + "catalogo/index/{0}/nuevo/todos/sin/todos/{1}/ajax"; + private string SobrecargaUrl => SiteLink + "inicio/sobrecarga"; private const int MaxItemsPerPage = 18; private const int MaxSearchPageLimit = 6; // 18 items per page * 6 pages = 108 private readonly Dictionary _apiHeaders = new Dictionary @@ -149,6 +150,8 @@ namespace Jackett.Common.Indexers public override async Task Download(Uri link) { var result = await RequestStringWithCookies(link.AbsoluteUri); + if (SobrecargaUrl.Equals(result.RedirectingTo)) + throw new Exception("El servidor se encuentra sobrecargado en estos momentos. / The server is currently overloaded."); try { var parser = new HtmlParser(); var doc = parser.ParseDocument(result.Content);