Skip to content

yeasterday, debug codes, occured this error that cant get the links #201

Open
@LaJun

Description

@LaJun

i debug code, the "player_url" and "player" have values, but "link" is null, i dont have any idea , who can help me, thanks

image then i find $player_response object below, video base info can get but the video is not ["status"]=> string(10) "UNPLAYABLE" ["reason"]=> string(27) "This video is not available". image

my request code:

$response = $this->client->post("https://www.youtube.com/youtubei/v1/player?key=" . $configData->getApiKey(), json_encode([
            'context' => [
                "client" => [
                    "clientName" => "ANDROID_TESTSUITE",
                    "clientVersion" => "1.9",
                    "hl" => "en",
                    'clientScreen' => 'EMBED',
                ],
                'thirdParty' => ['embedUrl' => 'https://google.com'],
            ],
            "videoId" => $video_id,
            "playbackContext" => [
                "contentPlaybackContext" => [
                    "html5Preference" => "HTML5_PREF_WANTS"
                ]
            ],
            "racyCheckOk" => true,
            "contentCheckOk" => true,
        ], JSON_THROW_ON_ERROR), [
            'Content-Type' => 'application/json',
            'X-YouTube-Client-Name' => '85',
            'X-YouTube-Client-Version' => '2.0',
            'Origin' => 'https://www.youtube.com'
        ]); 

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