[REFACTOR] Rename response
This commit is contained in:
parent
25589d18d8
commit
264be8d529
1 changed files with 4 additions and 5 deletions
|
|
@ -87,13 +87,13 @@ public sealed class YouTubeClient : IDisposable
|
||||||
|
|
||||||
var request = new HttpRequestMessage(HttpMethod.Get, new Uri($"{NetworkService.Origin}/watch?v={videoId}"));
|
var request = new HttpRequestMessage(HttpMethod.Get, new Uri($"{NetworkService.Origin}/watch?v={videoId}"));
|
||||||
|
|
||||||
var response = await NetworkService.MakeRequestAsync(request, this, true, cancellationToken);
|
var videoResponse = await NetworkService.MakeRequestAsync(request, this, true, cancellationToken);
|
||||||
if (!response.IsSuccess && !string.IsNullOrWhiteSpace(response.Value))
|
if (!videoResponse.IsSuccess && !string.IsNullOrWhiteSpace(videoResponse.Value))
|
||||||
{
|
{
|
||||||
return response.Error ?? ResultError.Fail("Request failed!");
|
return videoResponse.Error ?? ResultError.Fail("Request failed!");
|
||||||
}
|
}
|
||||||
|
|
||||||
var html = response.Value;
|
var html = videoResponse.Value;
|
||||||
|
|
||||||
var stateResult = GetClientStateFromHtml(html);
|
var stateResult = GetClientStateFromHtml(html);
|
||||||
var state = stateResult.Value;
|
var state = stateResult.Value;
|
||||||
|
|
@ -102,7 +102,6 @@ public sealed class YouTubeClient : IDisposable
|
||||||
state = State;
|
state = State;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
var htmlParseResult = HtmlParser.GetVideoDataFromHtml(html);
|
var htmlParseResult = HtmlParser.GetVideoDataFromHtml(html);
|
||||||
if (!htmlParseResult.IsSuccess)
|
if (!htmlParseResult.IsSuccess)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue