diff --git a/app/Services/PageScrapper.php b/app/Services/PageScrapper.php index bd86bad..7a2b7aa 100644 --- a/app/Services/PageScrapper.php +++ b/app/Services/PageScrapper.php @@ -19,16 +19,15 @@ class PageScrapper $strForPregMatch = "/" . "{$this->contentMarker}" . "(.*)<\/div>/isU"; $arr = []; $rez = preg_match_all($strForPregMatch, $page, $arr); - return $content = $arr[1][0].''; - + return $content = $arr[1][0] . ''; } public function normalizeURLFile($content) { - $rez = preg_match_all('/href="(.*)"/isU',$content,$arr); + $rez = preg_match_all('/href="(.*)"/isU', $content, $arr); foreach ($arr[1] as $el) { if (strpos($el, 'http') !== 0) { - $content = str_replace($el,'https://mkgtu.ru'.$el,$content); + $content = str_replace($el, 'https://mkgtu.ru' . $el, $content); } } return $content;