|
...
|
...
|
@@ -4,6 +4,7 @@ |
|
|
|
namespace App\Helper;
|
|
|
|
|
|
|
|
use App\Utils\HttpUtils;
|
|
|
|
use GuzzleHttp\Client;
|
|
|
|
use GuzzleHttp\Exception\GuzzleException;
|
|
|
|
use Illuminate\Support\Facades\Cache;
|
|
|
|
use Illuminate\Support\Facades\Log;
|
|
...
|
...
|
@@ -95,7 +96,13 @@ class QuanqiusouApi |
|
|
|
//8918_kr_2024-02-19_2024-02-25.json 8918_2024-02-19_2024-02-25.json
|
|
|
|
$api_url = "https://quanqiusou.cn/google-rank/data_json/{$today}/{$api_no}_{$startDay}_{$endDay}.json";
|
|
|
|
try {
|
|
|
|
$res = HttpUtils::get($api_url, []);
|
|
|
|
//$res = HttpUtils::get($api_url, []);
|
|
|
|
$client = new Client();
|
|
|
|
$response = $client->request('GET', $api_url, [
|
|
|
|
'proxy' => '64.34.204.224:51395', // 代理服务器地址和端口号
|
|
|
|
// 其他请求选项
|
|
|
|
]);
|
|
|
|
$res = $response->getBody()->getContents();
|
|
|
|
if($res){
|
|
|
|
$res = Arr::s2a($res);
|
|
|
|
Cache::put($key, $res, 2 * 3600);
|
...
|
...
|
|