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

Not all video's are returning a list of URLs #73

Open
codeit-ninja opened this issue Sep 1, 2020 · 3 comments
Open

Not all video's are returning a list of URLs #73

codeit-ninja opened this issue Sep 1, 2020 · 3 comments

Comments

@codeit-ninja
Copy link

I was testing out this script when I noticed that not all video's are working.

For example, this video returns an empty array: https://www.youtube.com/watch?v=FyKWUTwSYAs

I noticed when I logged the $page_html in YouTubeDownloader.php:138 getPlayerResponse() that the layout looks different then for example this video: https://www.youtube.com/watch?v=1Q8fG0TtVAY

@julitroalves
Copy link

julitroalves commented Sep 3, 2020

Same issue here, to solve this I changed the lines into class YouTubeDownloader.php at function getDownloadLinks():

        // get JSON encoded parameters that appear on video pages
        $json = $this->getPlayerResponse($page_html);

        if ($json === null) {
            $json = $this->getVideoInfo($this->extractVideoId($video_id));
        }

        // get player.js location that holds signature function
        $url = $this->getPlayerScriptUrl($page_html);
        $js = $this->getPlayerCode($url);

        $result = $this->parsePlayerResponse($json['player_response'], $js);

@Athlon1600 Athlon1600 pinned this issue Oct 3, 2020
@Athlon1600
Copy link
Owner

Athlon1600 commented Oct 17, 2020

#73 (comment) that works!
I merged that exact solution into the latest v2.1.1 version:
https://github.com/Athlon1600/youtube-downloader/releases

@azinkey
Copy link

azinkey commented Dec 20, 2020

this one not working too
https://www.youtube.com/watch?v=PRH9YMkvT3o

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

No branches or pull requests

4 participants