8000 Video info not found Error · Issue #1 · onlyfrofun/youtube · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Video info not found Error #1
Open
@awal4real

Description

@awal4real

I need help to resolve this issue.
I am getting:

Array ( [ok] => [status] => 200 [message] => Video info not found. )

and below is my code.

function downloadYouTubeVideo($videoUrl = null) {
    if (!$videoUrl) {
        echo "Error: No video URL provided.";
        return;
    }

    include 'YouTube.php';
    $youtube = new YouTube();
    $id = $youtube->extractVideoId($videoUrl);
    $info = $youtube->extractVideoInfo($id, 'android');
   
    echo '<pre>';
    print_r($info); // print response for debuging
    echo '</pre>';
    
    // Get the highest quality MP4 download URL
    $downloadUrl = $info['medias']['video'][0]['url'];
    
    // Download the video as "video.mp4"
    $youtube->download('video.mp4', $downloadUrl);
}

// Handle the download request (if URL is passed in GET)
if (isset($_GET['videoUrl'])) {
    $videoUrl = $_GET['videoUrl'];
    downloadYouTubeVideo($videoUrl);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0