This commit is contained in:
jianghanbo 2024-08-20 09:26:37 +08:00
parent 5468298ed4
commit 9b4e02ed76
2 changed files with 12 additions and 7 deletions

View File

@ -400,6 +400,10 @@ class SpiderDy extends Command
} }
} }
// 数据小于50, 结束
if (count($list) < 50) {
break;
}
$page++; $page++;
} }
} }

View File

@ -166,10 +166,11 @@ class Douyin
echo date('Y-m-d', $start) . '--' . date('Y-m-d', $end) . " 抖音 page:{$page} total_count:" . $list->data->pagination->total_count . " page_count:" . $list->data->pagination->page_count . " \n\n"; echo date('Y-m-d', $start) . '--' . date('Y-m-d', $end) . " 抖音 page:{$page} total_count:" . $list->data->pagination->total_count . " page_count:" . $list->data->pagination->page_count . " \n\n";
foreach ($list->data->list as $order) { foreach ($list->data->list as $order) {
echo "抖音 订单号:{$order->order_id} \n\n"; Log::info("抖音 订单号:{$order->order_id} \n\n");
$orderDetail = $this->_orderDetail($order->order_id, $order->status); $orderDetail = $this->_orderDetail($order->order_id, $order->status);
if (empty($orderDetail)) { if (empty($orderDetail)) {
Log::info("抖音 订单号拉取失败:{$order->order_id}");
throw new Exception("抖音拉单{$order->order_id}详情获取失败"); throw new Exception("抖音拉单{$order->order_id}详情获取失败");
} }
@ -571,12 +572,12 @@ class Douyin
} }
$body = curl_exec($ch); $body = curl_exec($ch);
curl_close($ch); curl_close($ch);
// if ($this->os == 5) { if ($this->os == 5) {
// echo "抖音 os{$this->os} \n\n"; Log::info("抖音 os{$this->os} \n\n");
// echo "抖音 订单url{$url} \n\n"; Log::info( "抖音 订单url{$url} \n\n");
// echo "抖音 订单cookie{$this->_cookie()} \n\n"; Log::info( "抖音 订单cookie{$this->_cookie()} \n\n");
// echo "抖音 body{$body} \n\n"; Log::info( "抖音 body{$body} \n\n");
// } }
if (!in_array($method, ['GET', 'POST'])) { if (!in_array($method, ['GET', 'POST'])) {
$header_size = curl_getinfo($ch, CURLINFO_HEADER_SIZE); $header_size = curl_getinfo($ch, CURLINFO_HEADER_SIZE);
$header = substr($body, 0, $header_size); $header = substr($body, 0, $header_size);