|
去水印API接口:
http://api.0l0.cn/
模版:
- public function analysis($videoUrl)
- {
- try {
- $this->getUser();
- $url = "你的接口地址" . $videoUrl;
-
- $s = file_get_contents($url);
- $s = json_decode($s, true);
- if ($s['code'] == '200') {
- $s = $s['data'];
- $reData = [
- "title" => $s['title']??"",
- "cover" => $s['cover_url']??""
- ];
- if ($s['type'] == '2') {
- $reData['images'] = $s['images']??"";
- } else {
- $reData['video'] = $this->getUrl302($s['downurl']??"");
- }
- return [
- "code" => 200,
- "data" => $reData,
- "msg" => "解析成功"
- ];
- } else {
- return [
- "code" => -1,
- "data" => null,
- "msg" => "解析失败,不支持该平台"
- ];
- }
- } catch (Exception $e) {
- return [
- "code" => -1,
- "data" => null,
- "msg" => "解析失败,程序出错了"
- ];
- }
- }
复制代码
视频去水印小程序演示
|
|