parent
4b03920b29
commit
2a6cdb1adf
|
@ -24,7 +24,7 @@ use \App\Models\Language;
|
||||||
use \App\Models\Author;
|
use \App\Models\Author;
|
||||||
use \App\Models\Tag;
|
use \App\Models\Tag;
|
||||||
use \App\Source;
|
use \App\Source;
|
||||||
use Log;
|
use Illuminate\Support\Facades\Log;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Парсер для Apero.ru
|
* Парсер для Apero.ru
|
||||||
|
@ -49,12 +49,17 @@ class Apero extends Source {
|
||||||
$this->loadStr($text);
|
$this->loadStr($text);
|
||||||
$this->parseIndex();
|
$this->parseIndex();
|
||||||
foreach ($this->urls as $url) {
|
foreach ($this->urls as $url) {
|
||||||
$text = $this->get_text($url);
|
try {
|
||||||
$text = mb_convert_encoding($text, 'UTF-8', 'auto');
|
$text = $this->get_text($url);
|
||||||
$this->loadStr($text);
|
$text = mb_convert_encoding($text, 'UTF-8', 'auto');
|
||||||
$this->page($url);
|
$this->loadStr($text);
|
||||||
|
$this->page($url);
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
Log::error($e->getMessage());
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function parseIndex()
|
public function parseIndex()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue