diff --git a/app/Services/BilibiliServiceV2.php b/app/Services/BilibiliServiceV2.php index 23a3151..e2f62a4 100644 --- a/app/Services/BilibiliServiceV2.php +++ b/app/Services/BilibiliServiceV2.php @@ -914,11 +914,13 @@ done && echo "ok"'); } Log::info($downloadResult); Log::info("$aid current download result: " . $downloadResult); + $lastLine = explode("\n", $downloadResult)[count(explode("\n", $downloadResult)) - 2]; + Log::info("lastLine is $lastLine"); try { usleep(random_int(1000, 10000) * 1000); } catch (Exception $e) { } - if (trim($downloadResult) == 'ok') { + if (trim($lastLine) == 'ok') { return true; } else { return false;