如何从youtube视频获取视频标签?

Hi I want to get tags of video from youtube video url, I have searched in google but mostly I get answer that "YouTube's API can no longer be used to retrieve tags".

So is there any way that I can get video tags from youtube video using php or any api?

For example for URL : http://www.youtube.com/watch?v=LIjs3-8cZVA

$connect = file_get_contents("http://www.youtube.com/watch?v=LIjs3-8cZVA");
preg_match_all('|<meta property="og\:video\:tag" content="(.+?)">|si', $connect, $tags, PREG_SET_ORDER);
foreach ($tags as $tag) {
    echo $tag[1] . "<br>";
}

I hope it helps.

You could also try

$meta = get_meta_tags( "http://www.youtube.com/watch?v=LIjs3-8cZVA" );
$tags = isset( $meta['keywords'] ) ? $meta['keywords'] : '';

You can use videos.list API method for tags, instead of downloading the whole content.

Here's a PHP sample: https://github.com/youtube/api-samples/blob/master/php/update_video.php#L73