{ "sites": [ { "key": "牛牛", "name": "牛牛", "type": 0, "api": "https://api.niuniuzy.me/api.php/provide/vod/from/nnm3u8/at/xml", "searchable": 1, "quickSearch": 1, "filterable": 0 } ] } 's2' => ['name' => '💧无水印', 'api' => 'https://api.wsyzy.net/api.php/provide/vod'], 's3' => ['name' => '🧸量子', 'api' => 'https://cj.lziapi.com/api.php/provide/vod'], 's4' => ['name' => '📺1080资源', 'api' => 'https://api.1080zyku.com/inc/api_mac10.php'], 's5' => ['name' => '🔥155资源', 'api' => 'https://155api.com/api.php/provide/vod'], 's6' => ['name' => '📺天涯', 'api' => 'https://tyyszy.com/api.php/provide/vod'], 's7' => ['name' => '📺暴风', 'api' => 'https://bfzyapi.com/api.php/provide/vod'], 's8' => ['name' => '⚡索尼闪电', 'api' => 'https://xsd.sdzyapi.com/api.php/provide/vod'], 's9' => ['name' => '📺索尼', 'api' => 'https://suoniapi.com/api.php/provide/vod'], 's10' => ['name' => '📺红牛', 'api' => 'https://www.hongniuzy2.com/api.php/provide/vod'], 's11' => ['name' => '📺茅台', 'api' => 'https://caiji.maotaizy.cc/api.php/provide/vod'], 's12' => ['name' => '🐯虎牙', 'api' => 'https://www.huyaapi.com/api.php/provide/vod'], 's13' => ['name' => '📺豆瓣', 'api' => 'https://caiji.dbzy.tv/api.php/provide/vod'], 's14' => ['name' => '📺豆瓣2', 'api' => 'https://dbzy.tv/api.php/provide/vod'], 's15' => ['name' => '📺豆瓣3', 'api' => 'https://caiji.dbzy5.com/api.php/provide/vod/from/dbm3u8/at/josn'], 's16' => ['name' => '📺豪华', 'api' => 'https://hhzyapi.com/api.php/provide/vod'], 's17' => ['name' => '📺CK资源', 'api' => 'https://ckzy.me/api.php/provide/vod'], 's18' => ['name' => '📺U酷', 'api' => 'https://api.ukuapi.com/api.php/provide/vod'], 's19' => ['name' => '📺U酷2', 'api' => 'https://api.ukuapi88.com/api.php/provide/vod'], 's20' => ['name' => '📺ikun', 'api' => 'https://ikunzyapi.com/api.php/provide/vod'], 's21' => ['name' => '📺无尽', 'api' => 'https://api.wujinapi.cc/api.php/provide/vod'], 's22' => ['name' => '📺丫丫', 'api' => 'https://cj.yayazy.net/api.php/provide/vod'], 's23' => ['name' => '🌕光速', 'api' => 'https://api.guangsuapi.com/api.php/provide/vod'], 's24' => ['name' => '📺卧龙', 'api' => 'https://collect.wolongzyw.com/api.php/provide/vod'], 's25' => ['name' => '📺卧龙2', 'api' => 'https://collect.wolongzy.cc/api.php/provide/vod'], 's26' => ['name' => '📺卧龙3', 'api' => 'https://wolongzyw.com/api.php/provide/vod'], 's27' => ['name' => '📺新浪', 'api' => 'https://api.xinlangapi.com/xinlangapi.php/provide/vod'], 's28' => ['name' => '📺无尽2', 'api' => 'https://api.wujinapi.com/api.php/provide/vod'], 's29' => ['name' => '📺无尽3', 'api' => 'https://api.wujinapi.me/api.php/provide/vod'], 's30' => ['name' => '📺无尽4', 'api' => 'https://api.wujinapi.net/api.php/provide/vod'], 's31' => ['name' => '📺旺旺短剧', 'api' => 'https://wwzy.tv/api.php/provide/vod'], 's32' => ['name' => '📺旺旺', 'api' => 'https://api.wwzy.tv/api.php/provide/vod'], 's33' => ['name' => '📺最大', 'api' => 'http://zuidazy.me/api.php/provide/vod'], 's34' => ['name' => '📺最大2', 'api' => 'https://api.zuidapi.com/api.php/provide/vod'], 's35' => ['name' => '🌸樱花', 'api' => 'https://m3u8.apiyhzy.com/api.php/provide/vod'], 's36' => ['name' => '📺步步高', 'api' => 'https://api.yparse.com/api/json'], 's37' => ['name' => '🐮牛牛', 'api' => 'https://api.niuniuzy.me/api.php/provide/vod'], 's38' => ['name' => '🔞gay资源', 'api' => 'https://gayapi.com/api.php/provide/vod/at/json'], 's39' => ['name' => '☁️百度云', 'api' => 'https://api.apibdzy.com/api.php/provide/vod'], 's40' => ['name' => '☁️神马云', 'api' => 'https://api.1080zyku.com/inc/apijson.php/'], 's41' => ['name' => '🏎速播', 'api' => 'https://subocaiji.com/api.php/provide/vod'], 's42' => ['name' => '🦅金鹰', 'api' => 'https://jinyingzy.com/api.php/provide/vod'], 's43' => ['name' => '🦅金鹰2', 'api' => 'https://jyzyapi.com/api.php/provide/vod'], 's44' => ['name' => '⚡闪电', 'api' => 'https://sdzyapi.com/api.php/provide/vod'], 's45' => ['name' => '👑非凡', 'api' => 'https://cj.ffzyapi.com/api.php/provide/vod'], 's46' => ['name' => '🍃飘零', 'api' => 'https://p2100.net/api.php/provide/vod'], 's47' => ['name' => '🐾魔爪', 'api' => 'https://mozhuazy.com/api.php/provide/vod'], 's48' => ['name' => '📺魔都动漫', 'api' => 'https://caiji.moduapi.cc/api.php/provide/vod'], 's49' => ['name' => '📺魔都', 'api' => 'https://www.mdzyapi.com/api.php/provide/vod'] ]; public function getName() { return "影视+专属全网聚合"; } public function init($extend = "") {} private function buildUrl($url, $query) { return strpos($url, '?') !== false ? $url . '&' . $query : $url . '?' . $query; } private function setCurlOpts($ch, $url, $timeout = 10) { curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_ENCODING, ''); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_TIMEOUT, $timeout); curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36'); } private function cleanItem($item, $sourceKey, $sourceName, $isDetail = false) { if (!$isDetail) { $item['vod_id'] = $sourceKey . '@@' . $item['vod_id']; } $item['vod_remarks'] = $sourceName . " | " . ($item['vod_remarks'] ?? ''); if (!empty($item['vod_play_from'])) { $froms = explode('$$$', $item['vod_play_from']); foreach ($froms as &$f) { $f = $sourceName . '-' . $f; } $item['vod_play_from'] = implode('$$$', $froms); } unset($item['vod_down_from']); unset($item['vod_down_url']); return $item; } public function homeContent($filter = []) { $classes = []; $filters = []; $mh = curl_multi_init(); $ch_list = []; foreach (self::SOURCES as $key => $source) { $classes[] = ['type_id' => $key, 'type_name' => $source['name']]; $ch = curl_init(); $this->setCurlOpts($ch, $this->buildUrl($source['api'], "ac=list"), 4); curl_multi_add_handle($mh, $ch); $ch_list[$key] = $ch; } $active = null; do { $mrc = curl_multi_exec($mh, $active); } while ($mrc == CURLM_CALL_MULTI_PERFORM); while ($active && $mrc == CURLM_OK) { if (curl_multi_select($mh) != -1) { do { $mrc = curl_multi_exec($mh, $active); } while ($mrc == CURLM_CALL_MULTI_PERFORM); } } foreach ($ch_list as $key => $ch) { $response = curl_multi_getcontent($ch); curl_multi_remove_handle($mh, $ch); curl_close($ch); $res = json_decode($response, true); $filterValues = [['n' => '全部(最新)', 'v' => '']]; if (isset($res['class'])) { foreach ($res['class'] as $c) { $filterValues[] = ['n' => $c['type_name'], 'v' => $c['type_id']]; } } $filters[$key] = [['key' => 'cateId', 'name' => '分类', 'value' => $filterValues]]; } curl_multi_close($mh); return ['class' => $classes, 'filters' => $filters, 'list' => []]; } public function categoryContent($tid, $pg = 1, $filter = [], $extend = []) { if (!isset(self::SOURCES[$tid])) return ['list' => []]; $source = self::SOURCES[$tid]; if (!is_array($extend)) $extend = []; $realTid = isset($extend['cateId']) ? $extend['cateId'] : ''; $query = "ac=detail&pg={$pg}"; if ($realTid !== '') $query .= "&t={$realTid}"; $ch = curl_init(); $this->setCurlOpts($ch, $this->buildUrl($source['api'], $query), 10); $html = curl_exec($ch); curl_close($ch); $res = json_decode($html, true); $list = []; if (isset($res['list'])) { foreach ($res['list'] as $item) { $list[] = $this->cleanItem($item, $tid, $source['name'], false); } } return ['list' => $list, 'page' => $res['page'] ?? $pg, 'pagecount' => $res['pagecount'] ?? 0, 'limit' => $res['limit'] ?? 20, 'total' => $res['total'] ?? 0]; } public function detailContent($ids) { $id = is_array($ids) ? $ids[0] : $ids; if (strpos($id, '@@') === false) return ['list' => []]; list($sourceKey, $realId) = explode('@@', $id); if (!isset(self::SOURCES[$sourceKey])) return ['list' => []]; $source = self::SOURCES[$sourceKey]; $ch = curl_init(); $this->setCurlOpts($ch, $this->buildUrl($source['api'], "ac=detail&ids={$realId}"), 10); $html = curl_exec($ch); curl_close($ch); $res = json_decode($html, true); $list = []; if (isset($res['list'])) { foreach ($res['list'] as $item) { $cleaned = $this->cleanItem($item, $sourceKey, $source['name'], true); $cleaned['vod_id'] = $id; $list[] = $cleaned; } } return ['list' => $list]; } public function searchContent($key, $quick = false, $pg = 1) { $keyword = urlencode($key); $list = []; $maxPageCount = 0; $mh = curl_multi_init(); $ch_list = []; foreach (self::SOURCES as $sourceKey => $source) { $ch = curl_init(); $this->setCurlOpts($ch, $this->buildUrl($source['api'], "ac=detail&wd={$keyword}&pg={$pg}"), 6); curl_multi_add_handle($mh, $ch); $ch_list[$sourceKey] = $ch; } $active = null; do { $mrc = curl_multi_exec($mh, $active); } while ($mrc == CURLM_CALL_MULTI_PERFORM); while ($active && $mrc == CURLM_OK) { if (curl_multi_select($mh) != -1) { do { $mrc = curl_multi_exec($mh, $active); } while ($mrc == CURLM_CALL_MULTI_PERFORM); } } foreach ($ch_list as $sourceKey => $ch) { $response = curl_multi_getcontent($ch); curl_multi_remove_handle($mh, $ch); curl_close($ch); $source = self::SOURCES[$sourceKey]; $res = json_decode($response, true); if (isset($res['list'])) { foreach ($res['list'] as $item) { $list[] = $this->cleanItem($item, $sourceKey, $source['name'], false); } if (isset($res['pagecount']) && $res['pagecount'] > $maxPageCount) { $maxPageCount = $res['pagecount']; } } } curl_multi_close($mh); return ['list' => $list, 'page' => $pg, 'pagecount' => $maxPageCount ?: $pg, 'limit' => 40, 'total' => 9999]; } public function playerContent($flag, $id, $vipFlags = []) { return [ "parse" => 0, "url" => $id, "header" => [ "User-Agent" => "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36" ] ]; } } (new Spider())->run();