core: refactor http webclient part 1 #8529 (#7652)

Rename WebClientStringResult.Content to WebClientStringResult.ContentString
This commit is contained in:
Cory
2020-06-09 19:36:57 +02:00
committed by ngosang
parent cf34dfec8e
commit d760350dc0
90 changed files with 380 additions and 380 deletions

View File

@@ -129,13 +129,13 @@ namespace Jackett.Common.Indexers.Abstract
}
var response = await RequestLoginAndFollowRedirect(LoginUrl, pairs, string.Empty, true, SiteLink);
await ConfigureIfOK(response.Cookies, response.Content != null && response.Content.Contains("logout.php"), () =>
await ConfigureIfOK(response.Cookies, response.ContentString != null && response.ContentString.Contains("logout.php"), () =>
{
var loginResultParser = new HtmlParser();
var loginResultDocument = loginResultParser.ParseDocument(response.Content);
var loginResultDocument = loginResultParser.ParseDocument(response.ContentString);
var loginform = loginResultDocument.QuerySelector("#loginform");
if (loginform == null)
throw new ExceptionWithConfigData(response.Content, configData);
throw new ExceptionWithConfigData(response.ContentString, configData);
loginform.QuerySelector("table").Remove();
var errorMessage = loginform.TextContent.Replace("\n\t", " ").Trim();
@@ -206,7 +206,7 @@ namespace Jackett.Common.Indexers.Abstract
try
{
var json = JObject.Parse(response.Content);
var json = JObject.Parse(response.ContentString);
foreach (JObject r in json["response"]["results"])
{
var groupTime = DateTimeUtil.UnixTimestampToDateTime(long.Parse((string)r["groupTime"]));
@@ -266,7 +266,7 @@ namespace Jackett.Common.Indexers.Abstract
}
catch (Exception ex)
{
OnParseError(response.Content, ex);
OnParseError(response.ContentString, ex);
}
return releases;