jeckman / YouTube-Downloader

PHP script for downloading videos from youtube; also parsing youtube feed into RSS enclosures for podcatchers
GNU General Public License v2.0
895 stars 474 forks source link

Title / Filename Parsing no longer works #400

Closed SEKoner closed 5 years ago

SEKoner commented 5 years ago

Description

Title / Filename Parsing no longer works

Steps to Reproduce

https://www.youtube.com/watch?v=Uc5mfudMTKE

Affects every call

Version

V0.11

Additional Information

Hope someone helps out. I'm not skilled enough to solve this

noxdev2 commented 5 years ago

this issue is due to https://torrentfreak.com/popular-stream-ripper-voluntarily-disables-youtube-conversion-190723/

Sig=signature
youtube changed the sig format this script has the fixed sig format but I don't know https://github.com/Th3-822/rapidleech/blob/master/hosts/download/youtube_com.php

knpau commented 5 years ago

I Edited src/Provider/youtube/VideoInfo.php under getTitle function has fixed get the video title problem

added player_response key and change filename function

    private $allowed_keys = [
        'video_id',
        'status',
        'reason',
        'thumbnail_url',
        'title',
        'url_encoded_fmt_stream_map',
        'adaptive_fmts',
        'length_seconds',
        'player_response',
    ];

    public function getTitle()
    {
//        return $this->data['title'];
        $player_response = json_decode($this->data['player_response']);
        $filename = str_replace(str_split('\\\:*?"<>|=;'."\t\r\n\f"), '_', html_entity_decode(trim($player_response->videoDetails->title), ENT_QUOTES));
        return $filename;
    }
jeckman commented 5 years ago

dupe of #404