mirror of
https://github.com/Jackett/Jackett
synced 2025-03-04 10:48:26 +00:00
mejortorrent: dont dump the whole html into the error message when status=500
This commit is contained in:
parent
5857f00b0d
commit
f61401069c
1 changed files with 18 additions and 2 deletions
|
@ -153,7 +153,16 @@ namespace Jackett.Common.Indexers.Definitions
|
|||
var url = SiteLink + NewTorrentsUrl;
|
||||
var result = await RequestWithCookiesAsync(url);
|
||||
if (result.Status != HttpStatusCode.OK)
|
||||
throw new ExceptionWithConfigData(result.ContentString, configData);
|
||||
{
|
||||
if (result.Status == HttpStatusCode.InternalServerError)
|
||||
{
|
||||
throw new ExceptionWithConfigData("HTTP 500 Internal Server Error", configData);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new ExceptionWithConfigData(result.ContentString, configData);
|
||||
}
|
||||
}
|
||||
try
|
||||
{
|
||||
var searchResultParser = new HtmlParser();
|
||||
|
@ -207,7 +216,14 @@ namespace Jackett.Common.Indexers.Definitions
|
|||
var url = SiteLink + SearchUrl + i + "?" + qc.GetQueryString();
|
||||
var result = await RequestWithCookiesAsync(url);
|
||||
if (result.Status != HttpStatusCode.OK)
|
||||
throw new ExceptionWithConfigData(result.ContentString, configData);
|
||||
if (result.Status == HttpStatusCode.InternalServerError)
|
||||
{
|
||||
throw new ExceptionWithConfigData("HTTP 500 Internal Server Error", configData);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new ExceptionWithConfigData(result.ContentString, configData);
|
||||
}
|
||||
try
|
||||
{
|
||||
var searchResultParser = new HtmlParser();
|
||||
|
|
Loading…
Add table
Reference in a new issue