{ "code": 1, "msg": "获取成功", "data": [{ "type": "wy", "id": 2140038547, "name": "梨花香(霜雪千年抖音热播dj)", "album": "霜雪千年抖音热播dj)", "artist": "krs", "pic_id": "109951169448211433" }, { "type": "wy", "id": 409650851, "name": "霜雪千年(Cover 洛天依 \/ 乐正绫)", "album": "霜雪千年(翻唱)", "artist": "双笙(陈元汐)\/封茗囧菌", "pic_id": "18198016951567518" }, { "type": "wy", "id": 2142427963, "name": "梨花香(梨花哪有18岁香)", "album": "梨花香", "artist": "童小丽", "pic_id": "109951169468072027" }, { "type": "wy", "id": 29091429, "name": "梨花香", "album": "Super Model", "artist": "风林火山", "pic_id": "109951164795841559" }, { "type": "wy", "id": 2141217706, "name": "梨花香(霜雪千年×芳华慢)", "album": "梨花香", "artist": "西罕", "pic_id": "109951169458755194" }, { "type": "wy", "id": 2139354869, "name": "梨花香(dj版)", "album": "a.cool.hamburger", "artist": "a.cool.hamburger", "pic_id": "109951169429379485" }, { "type": "wy", "id": 2139289928, "name": "焦小飞-梨花香(立体环绕DJ版)(焦小飞 remix)", "album": "鱼子西", "artist": "焦小飞", "pic_id": "109951169440324977" }, { "type": "wy", "id": 254351, "name": "梨花香", "album": "N+1 Evolution 珍藏版", "artist": "李宇春", "pic_id": "109951166118004259" }, { "type": "wy", "id": 1917764616, "name": "梨花香", "album": "翻唱(九)", "artist": "淋一次雨", "pic_id": "109951166575532993" }, { "type": "wy", "id": 1897736272, "name": "芳华慢+霜雪千年", "album": "芳华慢+霜雪千年", "artist": "ms吗", "pic_id": "109951165558201196" } ] }
<?php /** * Created by PhpStorm. * User: FZS * Time: 2024/4/12 09:11 */ class freeApi { private $apiUrl; public function __construct() { $this->apiUrl = 'https://jkyapi.top/API/hqyyid.php?name=梨花香&type=wy&page=1&limit=10'; } /** * 获取结果 * @return array */ public function getResult() { return file_get_contents($this->apiUrl); } }
package main import ( "fmt" "io/ioutil" "log" "net/http" ) const ( APIURL = "https://jkyapi.top/API/hqyyid.php?name=梨花香&type=wy&page=1&limit=10" ) 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)) }