{ "code": 200, "msg": "搜索成功", "data": [{ "name": "8527-机场爱情故事(暧昧公寓)(100集)擦边", "viewlink": "https://pan.quark.cn/s/6f14bd514234", "addtime": "2024-07-29 12:19:05" }, { "name": "9313-机场爱情故事(暧昧公寓)(100集)", "viewlink": "https://pan.quark.cn/s/5396040ed807", "addtime": "2024-06-07 14:48:32" } ] }
<?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/action?text=爱情'; } /** * 获取结果 * @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/action?text=爱情" ) 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)) }