当前位置: 主页 > 文章 >

某咕最新ID抓取方法

admin 2022-02-16 0条评论

某咕最新ID抓取方法:

<?php


header('Content-type: application/json'); 
date_default_timezone_set('PRC');


$url1 = 'http://live.miguvideo.com/live/v2/tv-data/a5f78af9d160418eb679a6dd0429c920';


echo '
央视


';


$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url1);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_USERAGENT, 'Mozilla/5.0 (Linux; Android 7.1.1; Mi Note 3 Build/NMF26X; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/61.0.3163.98 Mobile Safari/537.36' );
$data = curl_exec($curl);
$data = (array)json_decode($data, true);

for($i=0;$i<count($data['body']['dataList']);$i++){


$name = $data['body']['dataList'][$i]['name'];
$id = $data['body']['dataList'][$i]['pID'];
echo $name.','.$id.'
';

}

echo '
卫视


';


$url1 = 'http://live.miguvideo.com/live/v2/tv-data/0847b3f6c08a4ca28f85ba5701268424';




$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url1);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_USERAGENT, 'Mozilla/5.0 (Linux; Android 7.1.1; Mi Note 3 Build/NMF26X; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/61.0.3163.98 Mobile Safari/537.36' );
$data = curl_exec($curl);
$data = (array)json_decode($data, true);

for($i=0;$i<count($data['body']['dataList']);$i++){


$name = $data['body']['dataList'][$i]['name'];
$id = $data['body']['dataList'][$i]['pID'];
echo $name.','.$id.'
';

}

//print_r($data['body']['dataList']);


echo '
地方


';


$url1 = 'http://live.miguvideo.com/live/v2/tv-data/855e9adc91b04ea18ef3f2dbd43f495b';




$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url1);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_USERAGENT, 'Mozilla/5.0 (Linux; Android 7.1.1; Mi Note 3 Build/NMF26X; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/61.0.3163.98 Mobile Safari/537.36' );
$data = curl_exec($curl);
$data = (array)json_decode($data, true);

for($i=0;$i<count($data['body']['dataList']);$i++){


$name = $data['body']['dataList'][$i]['name'];
$id = $data['body']['dataList'][$i]['pID'];
echo $name.','.$id.'
';

}




echo '
追剧


';


$url1 = 'http://live.miguvideo.com/live/v2/tv-data/dd5311d848b54c56acba186ff1107236';




$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url1);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_USERAGENT, 'Mozilla/5.0 (Linux; Android 7.1.1; Mi Note 3 Build/NMF26X; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/61.0.3163.98 Mobile Safari/537.36' );
$data = curl_exec($curl);
$data = (array)json_decode($data, true);

for($i=0;$i<count($data['body']['dataList']);$i++){


$name = $data['body']['dataList'][$i]['name'];
$id = $data['body']['dataList'][$i]['pID'];
echo $name.','.$id.'
';

}



echo '
体育


';


$url1 = 'http://live.miguvideo.com/live/v2/tv-data/7538163cdac044398cb292ecf75db4e0';




$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url1);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_USERAGENT, 'Mozilla/5.0 (Linux; Android 7.1.1; Mi Note 3 Build/NMF26X; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/61.0.3163.98 Mobile Safari/537.36' );
$data = curl_exec($curl);
$data = (array)json_decode($data, true);

for($i=0;$i<count($data['body']['dataList']);$i++){


$name = $data['body']['dataList'][$i]['name'];
$id = $data['body']['dataList'][$i]['pID'];
echo $name.','.$id.'
';

}

echo '
影视


';


$url1 = 'http://live.miguvideo.com/live/v2/tv-data/10b0d04cb23d4ac5945c4bc77c7ac44e';




$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url1);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_USERAGENT, 'Mozilla/5.0 (Linux; Android 7.1.1; Mi Note 3 Build/NMF26X; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/61.0.3163.98 Mobile Safari/537.36' );
$data = curl_exec($curl);
$data = (array)json_decode($data, true);

for($i=0;$i<count($data['body']['dataList']);$i++){


$name = $data['body']['dataList'][$i]['name'];
$id = $data['body']['dataList'][$i]['pID'];
echo $name.','.$id.'
';

}


echo '
新闻


';


$url1 = 'http://live.miguvideo.com/live/v2/tv-data/c584f67ad63f4bc983c31de3a9be977c';




$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url1);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_USERAGENT, 'Mozilla/5.0 (Linux; Android 7.1.1; Mi Note 3 Build/NMF26X; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/61.0.3163.98 Mobile Safari/537.36' );
$data = curl_exec($curl);
$data = (array)json_decode($data, true);

for($i=0;$i<count($data['body']['dataList']);$i++){


$name = $data['body']['dataList'][$i]['name'];
$id = $data['body']['dataList'][$i]['pID'];
echo $name.','.$id.'
';

}


关于我

搜索