一个可以去水印的解析接口

这是

public function douyin($url){
l o c = g e t h e a d e r s ( loc = get_headers( loc=getheaders(url, true)[‘location’];
preg_match(’/video/(.)//’, l o c , loc, loc,id);
a r r = j s o n d e c o d e ( arr = json_decode( arr=jsondecode(this->curl(‘https://短视频网址/web/api/v2/aweme/iteminfo/?item_ids=’.$id[1]), true);
preg_match(’/href="(.
?)">Found/’, $this->curl(str_replace( ‘play’, $arr[‘item_list’][0][“video”][“play_addr”][“url_list”][0])), $matches);
$video_url = str_replace(’&’, ‘&’, m a t c h e s [ 1 ] ) ; i f ( ! e m p t y ( matches[1]); if (!empty( matches[1]);if(!empty(video_url)){
$arr = array(
‘code’ => 200,
‘msg’ => ‘解析成功’,
‘data’ => array(
‘author’ => $arr[‘item_list’][0][‘author’][‘nickname’],
‘uid’ => $arr[‘item_list’][0][‘author’][‘unique_id’],
‘avatar’ => $arr[‘item_list’][0][‘author’][‘avatar_larger’][‘url_list’][0],
‘like’ => $arr[‘item_list’][0][‘statistics’][‘digg_count’],
‘time’ => $arr[‘item_list’][0][“create_time”],
‘title’ => $arr[‘item_list’][0][‘share_info’][‘share_title’],
‘cover’ => $arr[‘item_list’][0][‘video’][‘origin_cover’][‘url_list’][0],
‘url’ => $video_url,
‘music’ => array(
‘author’ => $arr[‘item_list’][0][‘music’][‘author’],
‘avatar’ => $arr[‘item_list’][0][‘music’][‘cover_large’][‘url_list’][0],
‘url’ => $arr[‘item_list’][0][‘music’][‘play_url’][‘url_list’][0],
)
)
);
return $arr;
}
}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

正经分享

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值