Giter Club home page Giter Club logo

youtube-downloader's People

Contributors

arjunae avatar athlon1600 avatar codezi avatar ibrram avatar shivampaw avatar unikapps avatar volkirik avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

youtube-downloader's Issues

other itag format

is it possible to get all formats (video/audio , video only and audio only)?

Ratebypass attribute ?

the link that is generated googlevideo.com/videoplayback?ratebypass comes..

What does it mean ? Like is there a max rate at which a video can be accessed and then it's streaming/downloading link wont come via cURL ?

Would appreciate more info on this
Thanks

itag codes outdated

Apparently Youtube updated the itag codes, itags provided in the parser class are not working

1080p and 480p video quality

Hello,

First, thanks for the script. It's very good!

I have a question ... How do I get the 1080p and 480p links?
When I try to extract them only appears 720p and 360p.

Thank you.

Ps: A suggestion ... The script could have an option to download directly, not playing the video in the browser.

Download url error

Forbidden

The video urls return 403 forbidden

Everytime do a https

Change

$player_url = str_replace('//', 'http://', $matches[1]);

to

$player_url = str_replace('//', 'https://', $matches[1]);

How to get best quality mp4 with audio and video

I'm looking for videos with format "mp4, 1080p, video/audio" or "mp4, 720p, video/audio".

But the links returned for the videos I've tried (movie trailers) mostly have a format that's either video or audio or unknown.

Is there a way to download the best quality mp4 version available with video and audio?

All the videos I've tried have 1080p streams with sound on youtube.com

Missing Formats

Video formats (1080, 4K, etc...) above 720p are not available for some reason.

problem when installing without COMPOSER

Because it doesn't tell where i should to get started, i searched on all folders and find index.html on public folder's.

I was quite happy when i load the index.html on my web browser, because it looks the same as the DEMO URL : https://youtube-downloader3.herokuapp.com/

But, when i'm pasting the YouTube links on the text button provided and pressing fetch.

This bad errors pops up : `PHP Warning: require(../vendor/autoload.php): failed to open stream: No such file or directory in htdocs\Athlon\public\video_info.php on line 3.

PHP Fatal error: require(): Failed opening required '../vendor/autoload.php'

So i was guessing ah i need to find those autoload.php thingies, but cant find any where on the zip that i downloaded from here :/ tried searching on all src/,tests/,public/ but No luck.

Screenshot_680

decipher problem

Hello, recently it can't generate signiture correctly for some videos!

Help

Hello, i just wanted to know if you can help me install that on my server, i have treid everything installing but it just wont show. can you please please tell me how i can install that on my vps. i have centos 6

Extracting an .m4a link?

I'm wanting only the audio from youtube videos. Is this something you would consider adding to the class? If not, where would I start when trying to change something like this?

Great work by the way; youtube-dl takes upwards of 4 seconds for me and what you've made takes at most 0.3 seconds. Incredible! Plus youtube-dl seems to fail every couple of weeks and require an update to get it back in working order so the downtime really sucks! Mad props

Server IP blocked by Youtube, We have been receiving a large volume of requests from your network

First Thank you for your awesome contribution, have made a test site youtube37 . com which is performing very well now. But now as I have continuously gaining users so every week my IP blocked. do you have any solution for that ? also can you recommended a cheap hosting with ffmpeg support and support to add custom IP as well. currently using dreamhost's shared hosting.

Thanks once again.

How to go around age gate

You can download age-gated videos too.

// age-gate
if(strpos($html, 'player-age-gate-content') !== false){
	// nothing you can do folks...
	return false;
}

There are 2 type age-gated videos:

1. Regular age-gate video

Download process looks like this:

  1. Download Youtube https://www.youtube.com/watch?v=HtVdAasjOgU and find it's age-gated.
  2. Download sts id from https://www.youtube.com/embed/HtVdAasjOgU (sts is 17184)
  3. jsonDecode request to https://www.youtube.com/get_video_info?video_id=HtVdAasjOgU&eurl=https%3A%2F%2Fyoutube.googleapis.com%2Fv%2FHtVdAasjOgU&sts=17184 and find links in url_encoded_fmt_stream_map

2. Age-gate video with encrypted signature

Similar like in first case but you need decrypt signature after step 3.
Demo video: https://www.youtube.com/watch?v=6kLq3WMV1nU

Some VEVO urls don't work

Been using the class for a while and i'm loving it! Noticed a few urls aren't working as expected though e.g https://www.youtube.com/watch?v=weeI1G46q0o could it be because it's vevo? I checked and it's not age restricted - I'm guessing something to do with the signature

FEATURE REQUEST

Awesome script...

Is there a way to fetch the title of the video and give an option of:

save as: 'source video title.mp4'

can the script handle downloads in mp3 out of the box?

Not working since couple month ago

hey Athlon1600,
i'm using your lib for a Telegram bot and i just realized that.
and now as i'm testing it and for making sure using your example
i mean this :
use YouTube\YouTubeDownloader;

$yt = new YouTubeDownloader();

$links = $yt->getDownloadLinks("https://www.youtube.com/watch?v=LJzCYSdrHMI");

var_dump($links);
it returns an empty array :
array(0) { }

Thanks in advance. 👍

Empty array

Hello,
My steps with clear Debian 10
apt update && apt -y upgrade
apt -y install php php-common
apt -y install php-cli php-fpm php-json php-pdo php-mysql php-zip php-gd php-mbstring php-curl php-xml php-pear php-bcmath
apt -y install libapache2-mod-php
systemctl restart apache2
apt install curl php-cli php-mbstring git unzip
cd ~
curl -sS https://getcomposer.org/installer -o composer-setup.php
php composer-setup.php --install-dir=/usr/local/bin --filename=composer
cd /var/www/html
composer require athlon1600/youtube-downloader

(/var/www/html/youtube.php):

require 'var/www/html/vendor/autoload.php';
use YouTube\YouTubeDownloader;
$yt = new YouTubeDownloader();
$links = $yt->getDownloadLinks("https://www.youtube.com/watch?v=QxsmWxxouIM");
var_dump($links);

And it's show array(0) { }

What did I do wrong?

Error 403 - Forbidden

The Demo API and the code are working but when I try to access the video ressources given, googlevideo.com responds with either a 403 Forbidden Error or a blank page.

I tried to access the ressource with Chrome, Firefox and a different IP with the Tor Browser.

All test weren't successful. Maybe YouTube changed something in their code. When I access the Demo Stream Version it redirects me to redirector.googlevideo.com instead of https://---.googlevideo.com/videoplayback?...

OpenSSL Error messages: error:14095126:SSL

Description

This error:

file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: error:14095126:SSL routines:ssl3_read_n:unexpected eof while reading

returns when:

$file = file_get_contents($url['url'], false, stream_context_create($arrContextOptions));

Steps to Reproduce

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

  1. Extract the video id:
    $video_id = $yt->extractVideoId(implode($url));
  2. Get the downloadable url
    $links = $yt->getDownloadLinks($video_id, $selector = 'video');
  3. Get the array key for the specified video quality etc.
    $arrayindex = array_search('mp4, video, 1080p, audio', array_column($links, 'format'));
  4. Set $url to array
    $url = $links[$arrayindex];
  5. Disable SSL
    $arrContextOptions=array( "ssl"=>array( "verify_peer"=>false, "verify_peer_name"=>false, ), );
  6. Get the file from the url
    $video = file_get_contents($url['url'], false, stream_context_create($arrContextOptions));
  7. Send the video back to front end
    return view('convert', [ 'url' => $url['url'], 'quality' => $url['format'], ]);

Expected behavior:
The video gets downloaded on my disk
Actual behavior:

I get this error:
file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: error:14095126:SSL routines:ssl3_read_n:unexpected eof while reading

The code stops executing on that line aswell.

Version

The latest version of:
https://github.com/Athlon1600/youtube-downloader

Additional Information

I'm running this on Laravel 7, with php artisan serve.

Cannot download some videos

Hey!
Any chance you can update the script with latest YT changes?
For example the video with this id: 3KiRiNyWVV4
Cannot be downloaded.

Thanks

Video without sound

No Youtube Video name?

how to get youtube original title?

SOLVE WITH EXISTING FUNCTION

        require_once(plugin_dir_path(__FILE__).'vendor/autoload.php');
        $yt             = new YouTubeDownloader();
        $links          = $yt->getDownloadLinks($_POST['youtubeLink']);
        $youtube_id     = $yt->extractId($_POST['youtubeLink']);
        $restriction    = $yt->curl('https://api.unblockvideos.com/youtube_restrictions?id='.$youtube_id);
        var_dump(json_decode($restriction)[0]->title);exit;

How to use css properties

Hi, am new to these stuffs, from medical background; i want to know how i can use this in my view or give it a UI and target each properties e.g $links->title, $links->duration and loop through the extensions format, just a guild please. i know it may sound foolish but anything you can do to help thanks

Access denied

I get

Access to r4---sn-gqn-jawe.googlevideo.com was denied You don't have authorization to view this page. HTTP ERROR 403

Also i tried with file_get_contents, or file_put_contents to see if i must to use same ip, but nothing...

Empty list of links

Hey, I tried updated version but on some videos it return empty array of links. It's missing "url_encoded_fmt_stream_map" is there any way to fix this?

Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.