From 6435aa9bdb56c1fc38d00af34c72a3b744466092 Mon Sep 17 00:00:00 2001 From: Elena Kim Date: Wed, 22 Sep 2021 20:10:28 +0300 Subject: [PATCH] change url for request --- XCDYouTubeKit/XCDYouTubeVideoOperation.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/XCDYouTubeKit/XCDYouTubeVideoOperation.m b/XCDYouTubeKit/XCDYouTubeVideoOperation.m index be4ce9ee..b4262087 100644 --- a/XCDYouTubeKit/XCDYouTubeVideoOperation.m +++ b/XCDYouTubeKit/XCDYouTubeVideoOperation.m @@ -151,7 +151,7 @@ - (void) startNextRequest NSDictionary *query = @{ @"video_id": self.videoIdentifier, @"hl": self.languageIdentifier, @"el": eventLabel, @"ps": @"default" }; NSString *queryString = XCDQueryStringWithDictionary(query); - NSURL *videoInfoURL = [NSURL URLWithString:[@"https://www.youtube.com/get_video_info?" stringByAppendingString:queryString]]; + NSURL *videoInfoURL = [NSURL URLWithString:[@"https://www.youtube.com/embed/" stringByAppendingString:self.videoIdentifier]]; [self startRequestWithURL:videoInfoURL type:XCDYouTubeRequestTypeGetVideoInfo]; } } @@ -360,7 +360,7 @@ - (void) handleJavaScriptPlayerWithScript:(NSString *)script NSString *sts = self.embedWebpage.sts ?: self.webpage.sts ?: @""; NSDictionary *query = @{ @"video_id": self.videoIdentifier, @"hl": self.languageIdentifier, @"eurl": eurl, @"sts": sts}; NSString *queryString = XCDQueryStringWithDictionary(query); - NSURL *videoInfoURL = [NSURL URLWithString:[@"https://www.youtube.com/get_video_info?" stringByAppendingString:queryString]]; + NSURL *videoInfoURL = [NSURL URLWithString:[@"https://www.youtube.com/embed/" stringByAppendingString:self.videoIdentifier]]; [self startRequestWithURL:videoInfoURL type:XCDYouTubeRequestTypeGetVideoInfo]; } else