parent
4b03920b29
commit
2a6cdb1adf
|
@ -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,10 +49,15 @@ class Apero extends Source {
|
|||
$this->loadStr($text);
|
||||
$this->parseIndex();
|
||||
foreach ($this->urls as $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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue