fixing
This commit is contained in:
parent
af4aa86f42
commit
207e392fff
|
@ -50,8 +50,12 @@ class PageScrapper
|
|||
|
||||
|
||||
$arr = [];
|
||||
//<footer(.*)<\/footer>
|
||||
//safdsaf sdfdasf<footer>--------------------------------fsdfdasf <\/footer> asdfdasf asdf
|
||||
$rez = preg_match_all($strForScissors, $content, $arr);
|
||||
$content = str_replace($arr[1], '', $content);
|
||||
//$arr[1][0] = '>--------------------------------fsdfdasf ';
|
||||
$content = str_replace($arr[0], '', $content);
|
||||
//safdsaf sdfdasf<footer<\/footer> asdfdasf asdf
|
||||
|
||||
return $content;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,43 @@
|
|||
@extends('layouts.applicant-layout')
|
||||
|
||||
@section('content')
|
||||
<div class=" fw-bolder fs-1 text-center py-5 lh-lg"> Академическая мобильность и международное сотрудничество </div>
|
||||
<div class="container pt-4 d-flex justify-content-center">
|
||||
|
||||
<div class="col-10">
|
||||
@php
|
||||
use App\Services\PageScrapper;
|
||||
$pageScrapper = new PageScrapper("https://mkgtu.ru/postuplenie/inostrannym-abiturientam/akademicheskaya-mobilnost-i-mezhdunarodnoe-sotrudnichestvo/akademicheskaya-mobilnost-i-fondy/", '<div class=["\']content_info["\']>');
|
||||
|
||||
$row = $pageScrapper->getHTML();
|
||||
//$tmp = explode('<footer',$row); $row = $tmp[0];
|
||||
$row = $pageScrapper->cutHTML($row,'/<footer(.*)<\/footer>/isU');
|
||||
|
||||
|
||||
$pageScrapper2 = new PageScrapper("https://mkgtu.ru/postuplenie/inostrannym-abiturientam/akademicheskaya-mobilnost-i-mezhdunarodnoe-sotrudnichestvo/individualnaya-mobilnost-studentov-i-aspirantov/", '<div class=["\']content_info["\']>');
|
||||
|
||||
$row2 = $pageScrapper2->getHTML();
|
||||
//$tmp = explode('<footer',$row2); $row2 = $tmp[0];
|
||||
$row2 = $pageScrapper2->cutHTML($row2,'/<footer(.*)<\/footer>/isU');
|
||||
|
||||
|
||||
$pageScrapper3 = new PageScrapper("https://mkgtu.ru/postuplenie/inostrannym-abiturientam/akademicheskaya-mobilnost-i-mezhdunarodnoe-sotrudnichestvo/kak-stat-uchastnikom-programm-akademicheskoy-mobilnosti/", '<div class=["\']content_info["\']>');
|
||||
|
||||
$row3 = $pageScrapper3->getHTML();
|
||||
//$tmp = explode('<footer',$row3); $row3 = $tmp[0];
|
||||
$row3 = $pageScrapper3->cutHTML($row3,'/<footer(.*)<\/footer>/isU');
|
||||
|
||||
$content = $row . $row2 . $row3;
|
||||
//dd($content);
|
||||
|
||||
|
||||
//$content = $pageScrapper->cutHTML($row,'/<footer(.*)<\/footer>/isU');
|
||||
// $content = $pageScrapper->normalizeURLFile($content);
|
||||
|
||||
echo htmlspecialchars($content);
|
||||
|
||||
@endphp
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
Loading…
Reference in New Issue