0xced / XCDYouTubeKit

YouTube video player for iOS, tvOS and macOS
MIT License
2.92k stars 626 forks source link

No longer works: XCDYouTubeVideoErrorDomain error -3 #530

Closed ryanfrancesconi closed 2 years ago

ryanfrancesconi commented 3 years ago

Has google changed their API?

sample video I'm trying:

https://www.youtube.com/watch?v=MkU8v1genz0
2021-05-24 15:08:01.085443-0700 ADD[13367:365927] [XCDYouTubeKit] Failed to decode response from https://www.youtube.com/get_video_info?el=embedded&hl=en&ps=default&video_id=MkU8v1genz0 (response.textEncodingName = utf-8, data.length = 0)

2021-05-24 15:08:01.086579-0700 ADD[13367:365927] [XCDYouTubeKit] Video operation finished with error: The operation couldn’t be completed. 
(XCDYouTubeVideoErrorDomain error -3.)
Domain: XCDYouTubeVideoErrorDomain
Code:   -3
User Info: {
}

I see -3 has this note: Returned when an empty response is returned. This may indicate that YouTube has blocked requests from your IP address because of overuse.

Would be curious if others are seeing this as I don't use this enough to be blocked.

Thanks, Ryan

ryanfrancesconi commented 3 years ago

duplicate of: https://github.com/0xced/XCDYouTubeKit/issues/525

ryanfrancesconi commented 3 years ago

The merged PR doesn't show up in the SPM release yet.

Muhammad572 commented 3 years ago

Hi I want to know when will this issue be resolved thanks

hArshpb11 commented 3 years ago

Need to make little modification in "XCDYouTubeVideoOperation" For make this Fix. Replac line number 152,361 with new one that i have listedout at bottom.

File : XCDYouTubeVideoOperation

line: 152 line: 361

Modification for line 152: NSDictionary *query = @{ @"video_id": self.videoIdentifier, @"hl": self.languageIdentifier, @"el": eventLabel, @"ps": @"default" , @"html5" : @1,@"html5" : @1, @"c":@"TVHTML5", @"cver":@6.20180913};

Modification for line 361: NSDictionary *query = @{ @"video_id": self.videoIdentifier, @"hl": self.languageIdentifier, @"el": eventLabel, @"ps": @"default" , @"html5" : @1,@"html5" : @1, @"c":@"TVHTML5", @"cver":@6.20180913};

Muhammad572 commented 3 years ago

Thank @hArshpb11 this fixed for me.....

Soliy0u commented 3 years ago

Need to make little modification in "XCDYouTubeVideoOperation" For make this Fix. Replac line number 152,361 with new one that i have listedout at bottom.

File : XCDYouTubeVideoOperation

line: 152 line: 361

Modification for line 152: NSDictionary *query = @{ @"video_id": self.videoIdentifier, @"hl": self.languageIdentifier, @"el": eventLabel, @"ps": @"default", @"html5" : @1 };

Modification for line 361: NSDictionary *query = @{ @"video_id": self.videoIdentifier, @"hl": self.languageIdentifier, @"eurl": eurl, @"sts": sts, @"html5" : @1 };

It's worked for me. Thank bro!

wasim954 commented 3 years ago

When we can expect this fix in new pod version

@0xced

thisistorsten commented 3 years ago

Fixed here https://github.com/snakx/YouTubeApiSharp/commit/e7dd7720f34e7f454d44a625f5fe39c5535ec9fb

johnnie476 commented 3 years ago

Need to make little modification in "XCDYouTubeVideoOperation.m" For make this Fix cause the api we are using in isn't working for me(may be Api is depricated or something else i don't know)

File : XCDYouTubeVideoOperation.m

Modification for line 151: NSDictionary *query = @{ @"id": self.videoIdentifier};

Modification for line 153: NSURL *videoInfoURL = [NSURL URLWithString:[@"https://www.googleapis.com/youtube/v3/videos?part=id%2C+snippet&key={YOUR_API_KEY_HERE}" stringByAppendingString:queryString]];

you can get your api key from google console "YouTube Data API v3"

hArshpb11 commented 3 years ago

Need to make little modification in "XCDYouTubeVideoOperation" For make this Fix. Replac line number 152,361 with new one that i have listedout at bottom.

File : XCDYouTubeVideoOperation

line: 152 line: 361

Modification for line 152: NSDictionary *query = @{ @"video_id": self.videoIdentifier, @"hl": self.languageIdentifier, @"el": eventLabel, @"ps": @"default" , @"html5" : @1,@"html5" : @1, @"c":@"TVHTML5", @"cver":@6.20180913};

Modification for line 361: NSDictionary *query = @{ @"video_id": self.videoIdentifier, @"hl": self.languageIdentifier, @"el": eventLabel, @"ps": @"default" , @"html5" : @1,@"html5" : @1, @"c":@"TVHTML5", @"cver":@6.20180913};

here is a few minor things that make it working again.

devbest555 commented 3 years ago

hArshpb11

Need to make little modification in "XCDYouTubeVideoOperation" For make this Fix. Replac line number 152,361 with new one that i have listedout at bottom. File : XCDYouTubeVideoOperation line: 152 line: 361 Modification for line 152: NSDictionary query = @{ @"video_id": self.videoIdentifier, @"hl": self.languageIdentifier, @"el": eventLabel, @"ps": @"default" , @"html5" : @1,@"html5" : @1, @"c":@"TVHTML5", @"cver":@6.20180913}; Modification for line 361: NSDictionary query = @{ @"video_id": self.videoIdentifier, @"hl": self.languageIdentifier, @"el": eventLabel, @"ps": @"default" , @"html5" : @1,@"html5" : @1, @"c":@"TVHTML5", @"cver":@6.20180913};

here is a few minor things that make it working again.

Hi, hArshpb11 did you test the live videos? For "LIVE NOW" videos, it does play ?

cbg-dev-k commented 3 years ago

Livestreams worked for me using the above fix

devbest555 commented 3 years ago

can we chat in Skype or Telegram now? my skype : live:.cid.e5675d33daad7e3f telegram : @fullstackwe Thank you in advance

devbest555 commented 3 years ago

Livestreams worked for me using the above fix

Awaiting your reply

devbest555 commented 3 years ago

Livestreams worked for me using the above fix

live videoIDs : hartiIFC1s4, azl07ua79pa can you test these videos works in your side using XDCYouTubeVideoKit?

tungdangplus commented 3 years ago

It happens again today Jul 22, 2021.

dcristolovean commented 3 years ago

kinda happens monthly, what's going on here ? :(

ryanfrancesconi commented 3 years ago

my guess is that google is tired of non google access by downloaders such as this framework.

devbest555 commented 2 years ago

Fortunately, this error solved already

my guess is that google is tired of non google access by downloaders such as this framework.

GregoireTapptic commented 2 years ago

@devbest555 where exactly?

tungdangplus commented 2 years ago

Can anyone show me where to find final solution if any?

dcristolovean commented 2 years ago

Yes, stop using this lib, it's doomed anyway. Use the youtube-ios-player-helper instead.