gpt4 book ai didi

php - YouTube 链接不提供视频 ID

转载 作者:塔克拉玛干 更新时间:2023-11-03 06:03:14 26 4
gpt4 key购买 nike

<分区>

我已经试过了但是失败了:

$whereIsMyCake = '';

//
// put all the links here
//
$url = "http://www.youtube.com/embed/more_yougooglelink";

$url = "http://www.youtube.com/v/..." // works
$url = "http://www.youtube.com/watch?v=ue1mLnyEd90"; // WORKS
$url = "http://youtu.be/we_youGoogle_u"; // WORKS


parse_str( parse_url( $url, PHP_URL_QUERY ), $my_array_of_vars );
if($my_array_of_vars['v']=='') {
preg_match(
"#(?<=v=)[a-zA-Z0-9-]+(?=&)|(?<=v\/)[^&\n]+(?=\?)|(?<=v=)[^&\n]+|(?<=youtu.be/)[^&\n]+#",
$url,
$matches);

$whereIsMyCake = $matches[0];
} else {
$whereIsMyCake = $my_array_of_vars['v'];
}

echo $whereIsMyCake;

问题:现在 youtube.com/embed/videoid 在这里 似乎不起作用,如果 youtube 创建新链接我们必须不断更改我们的算法怎么办? youtube.com/embed/embed.weareruling/embed/embed/googleisboss/findmenow/video id is here ?

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com