Browse Source

fix result judge

feature/new_bilibili_and_instagram_sxs20191126
shixuesen 4 years ago
parent
commit
bfa6277939
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      app/Services/BilibiliServiceV2.php

+ 3
- 1
app/Services/BilibiliServiceV2.php View File

@ -914,11 +914,13 @@ done && echo "ok"');
} }
Log::info($downloadResult); Log::info($downloadResult);
Log::info("$aid current download result: " . $downloadResult); Log::info("$aid current download result: " . $downloadResult);
$lastLine = explode("\n", $downloadResult)[count(explode("\n", $downloadResult)) - 2];
Log::info("lastLine is $lastLine");
try { try {
usleep(random_int(1000, 10000) * 1000); usleep(random_int(1000, 10000) * 1000);
} catch (Exception $e) { } catch (Exception $e) {
} }
if (trim($downloadResult) == 'ok') {
if (trim($lastLine) == 'ok') {
return true; return true;
} else { } else {
return false; return false;


Loading…
Cancel
Save