{ "reason": "查询成功!", "result": [{ "title": "宁波黑坑水库盘老板,看看最后的渔获在你们那里能值多少钱。 #钓鱼 #dou来钓鱼516", "share_url": "https://www.iesdouyin.com/share/video/6960674964378897677/?region=CN&mid=6960676544603851533&u_code=0&titleType=title&did=MS4wLjABAAAANwkJuWIRFOzg5uCpDRpMj4OX-QryoDgn-yYlXQnRwQQ&iid=MS4wLjABAAAANwkJuWIRFOzg5uCpDRpMj4OX-QryoDgn-yYlXQnRwQQ&with_sec_did=1", "author": "天元邓刚", "item_cover": "https://p6.douyinpic.com/img/tos-cn-p-0015/cd3cd955c1ec40d8a346c7fc652db36f~c5_300x400.jpeg?from=2563711402_large", "hot_value": 188721410, "hot_words": "老板,最后的,钓鱼,宁波,黑坑,水库,看看,渔获,你们,那里,能值,多少,dou,516", "play_count": 303819638, "digg_count": 2209478, "comment_count": 97122 }], "error_code": 0 }
<?php /** * Created by PhpStorm. * User: FZS * Time: 2022/03/11 12:38 */ class freeApi { private $apiUrl; public function __construct() { $this->apiUrl = 'http://apis.juhe.cn/fapig/douyin/billboard?key=&type=hot_video'; } /** * 获取结果 * @return array */ public function getResult() { return file_get_contents($this->apiUrl); } }
package main import ( "fmt" "io/ioutil" "log" "net/http" ) const ( APIURL = "http://apis.juhe.cn/fapig/douyin/billboard?key=&type=hot_video" ) 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)) }