效果图:
网上大部分是python版本的今天鼓捣啦个php的
网易云音乐的爬虫主要难点是params,encSecKey这两个参数算法
参考项目:https://github.com/ljhe/GetWangYiYunComments
测试地址:https://api.79xj.cn/Hot_review.php?songid=1450163801
如果帮助到你就评论下吧!
代码附下:
<?php
/*
* Title:网易云热评
* auth:尹深
* QQ:1247333542
*/
class Hot_review
{
public function Get_comments($songid)
{
// 设置请求头
$headers = array(
'Accept:*/*',