From 2a6cdb1adf992c11d4376d6b22d063973af8aff6 Mon Sep 17 00:00:00 2001 From: Aleksandr Yakovlev Date: Tue, 28 Feb 2023 17:29:22 +0600 Subject: [PATCH] =?UTF-8?q?=D0=9B=D0=BE=D0=B2=D0=B8=D0=BC=20=D0=B8=D1=81?= =?UTF-8?q?=D0=BA=D0=BB=D1=8E=D1=87=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=B2=20?= =?UTF-8?q?=D0=BF=D0=B0=D1=80=D1=81=D0=B5=D1=80=D0=B5=20=D0=90=D0=BF=D0=B5?= =?UTF-8?q?=D1=80=D0=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Чинит #1345 --- app/Sources/Apero.php | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/app/Sources/Apero.php b/app/Sources/Apero.php index 4993295..399d4ed 100644 --- a/app/Sources/Apero.php +++ b/app/Sources/Apero.php @@ -24,7 +24,7 @@ use \App\Models\Language; use \App\Models\Author; use \App\Models\Tag; use \App\Source; -use Log; +use Illuminate\Support\Facades\Log; /** * Парсер для Apero.ru @@ -49,12 +49,17 @@ class Apero extends Source { $this->loadStr($text); $this->parseIndex(); foreach ($this->urls as $url) { - $text = $this->get_text($url); - $text = mb_convert_encoding($text, 'UTF-8', 'auto'); - $this->loadStr($text); - $this->page($url); + try { + $text = $this->get_text($url); + $text = mb_convert_encoding($text, 'UTF-8', 'auto'); + $this->loadStr($text); + $this->page($url); + } catch (\Exception $e) { + Log::error($e->getMessage()); + continue; + } } - } + } public function parseIndex() {