Upload via Git Manager GUI - test-youtube.php

This commit is contained in:
2026-03-30 18:42:41 +00:00
parent 095e3b5990
commit 3563752968

View File

@@ -1,28 +1,28 @@
<?php <?php
define('WP_USE_THEMES', false); define('WP_USE_THEMES', false);
require('../../../wp-load.php'); require('../../../wp-load.php');
echo "=== Testing YouTube Livestream Data ===\n\n"; echo "=== Testing YouTube Livestream Data ===\n\n";
$profile_url = 'https://www.youtube.com/@NashvilleBirdCam'; $profile_url = 'https://www.youtube.com/@NashvilleBirdCam';
$youtube_channel_id = 'UClOWy1mPxNB1D3cpmmxqGEg'; $youtube_channel_id = 'UClOWy1mPxNB1D3cpmmxqGEg';
echo "Profile URL: $profile_url\n"; echo "Profile URL: $profile_url\n";
echo "Channel ID: $youtube_channel_id\n\n"; echo "Channel ID: $youtube_channel_id\n\n";
$data = mm_video_get_livestream_data($profile_url, '', $youtube_channel_id); $data = mm_video_get_livestream_data($profile_url, '', $youtube_channel_id);
echo "=== Livestream Data ===\n"; echo "=== Livestream Data ===\n";
print_r($data); print_r($data);
if (!empty($data['video_id'])) { if (!empty($data['video_id'])) {
echo "\n✓ video_id found: " . $data['video_id'] . "\n"; echo "\n✓ video_id found: " . $data['video_id'] . "\n";
} else { } else {
echo "\n✗ video_id is EMPTY!\n"; echo "\n✗ video_id is EMPTY!\n";
} }
if (!empty($data['embed_url'])) { if (!empty($data['embed_url'])) {
echo "✓ embed_url found: " . $data['embed_url'] . "\n"; echo "✓ embed_url found: " . $data['embed_url'] . "\n";
} else { } else {
echo "✗ embed_url is EMPTY!\n"; echo "✗ embed_url is EMPTY!\n";
} }