{ "code": 200, "msg": "success", "data": { "title": "就爱这一口", "cover_url": "http://p9-dy.byteimg.com/large/tos-cn-p-0015/7d1ea7f8d99044e186e949a984040524_1572780949.jpeg?from=2563711402_large", "video_url": "http://v3-dy.ixigua.com/9299a2d5cc0c50367fd95dee64464716/5e5d281c/video/m/2203183afcac4da4d80ad848fcd54fc54721163fb99000008c4911f1bf54/?a=1128&br=0&bt=894&cr=0&cs=0&dr=0&ds=6&er=&l=202003022236450100080621960B45081F&lr=&qs=0&rc=M3B4dnFkbDRlcDMzO2kzM0ApOTo7OmdnOWU1N2hpZzc3aGcuMmNkcWhea3NfLS0vLS9zczI2XjIuYDQzYTAwNWEuYzM6Yw%3D%3D" }, "Author": { "name": "Alone88", "desc": "由Alone88提供的免费API 服务,官方文档:www.alapi.cn" } }
<?php /** * Created by PhpStorm. * User: FZS * Time: 2020/02/01 00:16 */ class freeApi { private $apiUrl; public function __construct() { $this->apiUrl = 'https://v1.alapi.cn/api/video/jh?url=https://h5.pipix.com/s/uW4KXh/'; } /** * 获取结果 * @return array */ public function getResult() { return file_get_contents($this->apiUrl); } }
package main import ( "fmt" "io/ioutil" "log" "net/http" ) const ( APIURL = "https://v1.alapi.cn/api/video/jh" ) func main() { queryUrl := fmt.Sprintf("%s?url=https://h5.pipix.com/s/uW4KXh/",APIURL) resp, err := http.Get(queryUrl) if err != nil { log.Println(err) return } defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { fmt.Println(err) return } fmt.Println(string(body)) }