You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi all!
I'm sorry if my question sounds stupid. I'm new to programming.
From the description I did not understand how to use this library.
My task is to download videos to my hosting. Tell me, did I understand correctly that:
1) This code will be enough to download the video?
use YouTube\YouTubeDownloader;
use YouTube\Exception\YouTubeException;
$youtube = new YouTubeDownloader();
try {
$downloadOptions = $youtube->getDownloadLinks("https://www.youtube.com/watch?v=aqz-KE-bpKQ");
if ($downloadOptions->getAllFormats()) {
echo $downloadOptions->getFirstCombinedFormat()->url;
} else {
echo 'No links found';
}
} catch (YouTubeException $e) {
echo 'Something went wrong: ' . $e->getMessage();
}
2) Is this code written in a PHP script?
3) Where is the video saved in this case?
The text was updated successfully, but these errors were encountered:
Hi all!
I'm sorry if my question sounds stupid. I'm new to programming.
From the description I did not understand how to use this library.
My task is to download videos to my hosting. Tell me, did I understand correctly that:
1) This code will be enough to download the video?
2) Is this code written in a PHP script?
3) Where is the video saved in this case?
The text was updated successfully, but these errors were encountered: