norkunas / youtube-dl-php

A PHP wrapper for youtube-dl or yt-dlp.
MIT License
456 stars 158 forks source link

Some variables probably not passed to execution #129

Closed promotion closed 4 years ago

promotion commented 4 years ago

Hi @norkunas ,

Yet another question (maybe bug)

when trying to get link (via your wrapper or in shell): https://www.espn.com/golf/story/_/id/29217233/tiger-woods-game-tom-brady-wild-ride-phil-mickelson-antics-peyton-manning-interest-made-fun-day-golf

I recieve 2 Errors :

  1. WARNING: Assuming --restrict-filenames since file system encoding cannot encode all characters. Set the LC_ALL environment variable to fix this.

  2. ssl.CertificateError: hostname u'hds.video-cdn.espn.com' doesn't match either of 'a248.e.akamai.net', '.akamaized-staging.net', '.akamaized.net', '.akamaihd-staging.net', '.akamaihd.net' in /web/vendor/symfony/process/Process.php:252

When trying with shell scirpt adding parametrs "restrict-filenames" and "no-check-certificate" - helps to get the file and things work fine. However in your wrapper if i add them like so :

$dl = new YoutubeDl([ 'continue' => true, // force resume of partially downloaded files. By default, youtube-dl will resume downloads if possible. 'output' => $this->makeFilename($url) . '.%(ext)s', 'restrict-filenames' => true, 'no-check-certificate'=>true ]);

But this doesnt work(I dont see those parameters in error debug) : The command "'/usr/local/bin/youtube-dl' 'https://www.espn.com/golf/story/_/id/29217233/tiger-woods-game-tom-brady-wild-ride-phil-mickelson-antics-peyton-manning-interest-made-fun-day-golf' '-j' '--no-playlist' '--ignore-config'" failed.

PS - same goes with PROXY , if i add proxy in format like so: 'proxy' = "user:pass@proxyip:port",

Seems it wont pass it to shell command.

norkunas commented 4 years ago

Hey, I've checked and these parameters are really in predefined options, so it should work, because if they wouldn't be defined you would get an exception that you provide unknown options.

norkunas commented 4 years ago

Closing as there is no feedback.