Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GetVideo() got "unexpected status code: 404" #196

Closed
surpassly opened this issue Jun 17, 2021 · 11 comments
Closed

GetVideo() got "unexpected status code: 404" #196

surpassly opened this issue Jun 17, 2021 · 11 comments
Labels

Comments

@surpassly
Copy link

surpassly commented Jun 17, 2021

go version 1.16.5
github.com/kkdai/youtube/v2 v2.7.0
video https://www.youtube.com/embed/wmqJYHH-hvI

@raitonoberu
Copy link

I have the same problem. If I try several times, it works (about 1 out of 5 times).
Go 1.16.4, youtube v2.7.0, video https://www.youtube.com/watch?v=dfkdRBAik0o (actually all the videos I've tried)

@drunlade
Copy link

Looks like the video_info endpoint this relies on is being shutdown.

Possible the work being done on https://github.com/tombulled/innertube my be a way forward.

@marcio199226
Copy link

marcio199226 commented Jun 18, 2021

Looks like the video_info endpoint this relies on is being shutdown.

Possible the work being done on https://github.com/tombulled/innertube my be a way forward.

That's not a good news...Do you have any info about it ?

EDITED:
Tyrrrz/YoutubeExplode#565
Hexer10/youtube_explode_dart#130

@raitonoberu
Copy link

raitonoberu commented Jun 18, 2021

YouTube now uses a different API located at https://www.youtube.com/youtubei/v1/<ep>. The guys from Pytube are also working on a solution: pytube/pytube#1021 (comment)

@drunlade
Copy link

drunlade commented Jun 18, 2021

Ok, with all the talk, I am not sure about the future of get_video_info, but I seemed to have fixed the issue with my package:

Are you sure? Because the concensus right now is that get_video_info still works sometimes but is on the way out. I also thought I'd fixed it with some tweaks to the URL but turned out I was just getting good responses at the time and later it stoppped working again.

EDIT: Oh hang on, I should have read you're link. You don't use the get_video_info. Hah.

EDIT EDIT: Hmmph. The message I am responding to and quoting has been deleted.

@drunlade
Copy link

EDIT: Oh hang on, I should have read you're link. You don't use the get_video_info. Hah.

Yeah, I do:

https://github.com/89z/mech/blob/640df956/youtube/video.go#L31

Huh. I followed you're link to the commit and the first thing I see in the readme is https://www.youtube.com/youtubei/v1/<ep> which made me think you were using that instead of get_video_info.

Oh well. It'll be nice if that is a fix but I suspect youtube is moving to drop that API entirely, unless there's a bunch of devices that require it and can't be updated?

@drunlade
Copy link

As you have literally no evidence to back up this claim (and from your profile, no programming experience [1]), I would strongly suggest you stop pushing it. All youre doing at this point is just gossip and spreading FUD, and actively wasting peoples time who are actually working on the problem.

1. https://github.com/drunlade

That's a rather juvinile response, as was deleting the quoted message, as well as linking to my profile as some sort of attack on my ability to have comments and input. You won't see anything on there because it's all on company repositories, which are private. Personally I think sixteen years of experience is enough to have some input.

Having read the threads, comments and issues raised on other projects, the conclusion by many (most?) developers is that the API is being retired and replaced with the youtubei API. They of course could be wrong, but I trust that people making all these libs have some idea what they're talking about.

@drunlade
Copy link

I have far better things to get on with than argue with someone who turns a discussion about code or implementation into a personal attack and an "I'm the superior developer" competetion. You're a good example of toxic behaviour, you don't discuss or explain, you insult and attack. Just consider for a moment the community you're part of and how you're actions reflect on it.

@corny
Copy link
Collaborator

corny commented Jun 19, 2021

@corny corny changed the title function GetVideo() got "unexpected status code: 404" GetVideo() got "unexpected status code: 404" Jun 19, 2021
@corny corny added the bug label Jun 19, 2021
@raitonoberu
Copy link

raitonoberu commented Jun 20, 2021

I created a PR, which seems to fix the issue (#197).
Please check if this works for you.

@esrrhs
Copy link

esrrhs commented Jun 21, 2021

same problem, waiting fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants