kkdai / youtube

Download Youtube Video in Golang
MIT License
3.37k stars 433 forks source link

Transition from get_video_info endpoint to youtubei (aka innertube) #198

Closed Camelva closed 3 years ago

Camelva commented 3 years ago

Description

New Client.videoDataByInnertube function which can fetch data about video. Works almost same as (possibly obsolete) get_video_info endpoint, but returns already structured json data without query string intermediary. Because of that, cheching for response status now impossible, so ErrResponseStatus is pointless, ErrPlayabiltyStatus doing all checking work now.

Sidenote: new playerResponseData was auto-generated and i just noticed some of the field names slightly differs (videoID -> videoId, URL -> Url and so on. Though it seems like these fields aren't used by anything anyways.

Issues to fix

Please link issues this PR will fix: \ #196

if no relevant issue, but this will fix something important for reference , please free to open an issue.

Reminding

Something you can do before PR to reduce time to merge

corny commented 3 years ago

Great job! Please check the linter warnings/errors.

ghost commented 3 years ago

I get a 404 when using this.

surpassly commented 3 years ago

I get a 404 when using this.

Same to me

corny commented 3 years ago

All tests are green. Please create a new issue if something does not work for you.

Camelva commented 3 years ago

All tests are green. Please create a new issue if something does not work for you.

Apparently, it seems like ciphered videos always return 403 "Access Denied" after decrypting. Available tests don't check this and i found out about this problem occasionally. Currently trying to find solution

Though, still never got 404 status as users above mentioned

surpassly commented 3 years ago

All tests are green. Please create a new issue if something does not work for you.

Great! thanks:)