curl = new CurlApp(); } public function exec() { $url = rtrim($this->baseUrl, '/') . '/fashion-shows/designer/' . $this->brandName; // var_dump($url); // list($request, $httpCode) = $curl->setUrl($url)->exec(); $request = $this->curl->setUrl($url)->exec(); if ($request) { preg_match_all('/window.__PRELOADED_STATE__ = ([\s\S]*?);<\/script>/', $request, $matches); $val = json_decode(current(end($matches)), true); return $val['transformed']['runwayDesignerContent']['designerCollections'] ?? []; } else { // $this->logger->info('未找到数据.'); return []; } } }