From 19f6c7c074f987fbb6262691c0c863590cc6b2b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cwanyongkang=E2=80=9D?= <“937888580@qq.com”> Date: Sat, 4 Sep 2021 13:32:03 +0800 Subject: [PATCH] laoying linelist --- script/linedata/get_line_list.php | 142 ++++++++++++------------------ 1 file changed, 55 insertions(+), 87 deletions(-) diff --git a/script/linedata/get_line_list.php b/script/linedata/get_line_list.php index c548460..167951c 100755 --- a/script/linedata/get_line_list.php +++ b/script/linedata/get_line_list.php @@ -15,14 +15,14 @@ $product_model = new Product; $product_list = $product_model->field('Id,Token')->fetchAll(); // //测试用---------------------------------------------------------------------------------------------------------- -// $apikey = '80cf4f64e990b78a9fc5eb'; -// $url = "http://rds-api.juip.com/server/index/getList?apikey=".$apikey; -// $mogu = json_decode(file_get_contents($url), true)['data']; -// dump($mogu);die; -// $mogu_data = get_product(__DIR__ . '/data/mogu.csv'); -// $mogu_f = fopen(__DIR__ . '/data/mogu.csv', 'w'); -// mogu_getList($mogu, $mogu_f, $all, $mogu_data); -// fclose($mogu_f); +// $laoying = json_decode(file_get_contents("http://diqu.pptp.pro:8070/sapi/getroslist"), true)['list']; +// if($laoying){ +// $laoying_data = get_product(__DIR__ . '/data/laoying.csv'); +// $laoying_f = fopen(__DIR__ . '/data/laoying.csv', 'w'); +// //写入老鹰文件 +// laoying_getList($laoying, $laoying_f, $all, $laoying_data); +// fclose($laoying_f); +// } // die; /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //强子迅联特征码 @@ -192,14 +192,14 @@ fclose($xianfeng_f); // jinrui_getList($jinrui, $jinrui_f, $all, $jinrui_data); // fclose($jinrui_f); -// //星星2288写入all -// $file2288 = fopen(__DIR__ . '/data/2288.csv', 'r'); -// while ($data = fgetcsv($file2288)) { -// fputcsv($all, $data); -// } -// fclose($file2288); -// fclose($all); -// fclose($dnx_exit); +$laoying = json_decode(file_get_contents("http://diqu.pptp.pro:8070/sapi/getroslist"), true)['list']; +if($laoying){ +$laoying_data = get_product(__DIR__ . '/data/laoying.csv'); +$laoying_f = fopen(__DIR__ . '/data/laoying.csv', 'w'); +//写入老鹰文件 +laoying_getList($laoying, $laoying_f, $all, $laoying_data); +fclose($laoying_f); +} sleep(5); auto_format_list(); @@ -561,103 +561,71 @@ function mogu_getList($data, &$file, &$all ) } -function laoying_getList($html, &$file, &$all, $exit) +function laoying_getList($list, &$file, &$all, $exit) { global $dnx_exit, $dnx_has_exit; $key = ''; - $list1 = []; - preg_match("/
(.*\s*?)<\/tbody>/is", $html, $result); - preg_match_all("/