{ "code": 200, "msg": "成功", "video": "https://alimov2.a.kwimgs.com/upic/2023/05/29/12/BMjAyMzA1MjkxMjA4MzBfODc4ODYzMTE3XzEwNDI0ODk2ODEwMl8xXzM=_b_Bbb1823a5e9bee463527153837d84de6d.mp4?clientCacheKey=3xnssi587b5nx56_b.mp4&tt=b&di=78e49c3f&bp=13414" }
<?php /** * Created by PhpStorm. * User: FZS * Time: 2024/5/10 07:11 */ class freeApi { private $apiUrl; public function __construct() { $this->apiUrl = 'https://api.kuleu.com/api/xjj?type=json'; } /** * 获取结果 * @return array */ public function getResult() { return file_get_contents($this->apiUrl); } }
package main import ( "fmt" "io/ioutil" "log" "net/http" ) const ( APIURL = "https://api.kuleu.com/api/xjj?type=json" ) func main() { queryUrl := fmt.Sprintf("%s",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)) }