[REFACTOR] Rename response
This commit is contained in:
@@ -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)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user