|
...
|
...
|
@@ -77,10 +77,8 @@ class RankDataController extends BaseController |
|
|
|
public function export(RankDataLogic $logic){
|
|
|
|
$lang = $this->request['lang'] ??'';
|
|
|
|
$data = $logic->keywords_rank_list(true);
|
|
|
|
|
|
|
|
$img_position = $video_position= false;
|
|
|
|
foreach ($data as &$item){
|
|
|
|
$item['domain'] = explode(':', $item['domain'])[1];
|
|
|
|
$item['lang'] = $this->request['lang'] ?: 'en';
|
|
|
|
$item['g_text'] = RankData::gMap()[$item['g']]??'';
|
|
|
|
$item['img_position'] = $item['img_position'] ?? '';
|
|
...
|
...
|
@@ -199,7 +197,7 @@ class RankDataController extends BaseController |
|
|
|
$promises['video_position'] = $client->getAsync('/google_video?'.Arr::query($param));
|
|
|
|
|
|
|
|
// 等待所有请求响应完成
|
|
|
|
$results = Utils:: settle($promises)->wait();
|
|
|
|
$results = Utils::settle($promises)->wait();
|
|
|
|
foreach ($results as $key => $result) {
|
|
|
|
if ($result['state'] == 'fulfilled') {
|
|
|
|
$res = Arr::s2a($result['value']->getBody()->getContents());
|
...
|
...
|
|