From f7bbcf41a68c5ef0624b1c783c5914fe1a0d1bd0 Mon Sep 17 00:00:00 2001 From: Alexander Date: Fri, 16 Aug 2024 14:31:52 +0300 Subject: [PATCH] =?UTF-8?q?=D0=BF=D1=80=D0=B8=20=D0=BE=D1=82=D0=BF=D1=80?= =?UTF-8?q?=D0=B0=D0=B2=D0=BA=D0=B5=20=D0=B7=D0=B0=D0=BF=D1=80=D0=BE=D1=81?= =?UTF-8?q?=D0=B0=20=D0=B1=D1=83=D0=B4=D0=B5=D0=BC=20=D0=BF=D0=BE=D0=B4?= =?UTF-8?q?=D1=81=D1=82=D0=B0=D0=B2=D0=BB=D1=8F=D1=82=D1=8C=20User-Agent?= =?UTF-8?q?=20=D0=B8=20=D1=80=D0=B0=D0=B7=D1=80=D0=B5=D1=88=D0=B5=D0=BD=20?= =?UTF-8?q?=D1=80=D0=B5=D0=B4=D0=B8=D1=80=D0=B5=D0=BA=D1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/app.php | 10 ++++++++-- app/library/ContingentManager.php | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/app/app.php b/app/app.php index d0f80d2..e575c2b 100644 --- a/app/app.php +++ b/app/app.php @@ -19,7 +19,7 @@ $sites = ContingentManager::getInstance()->getSites($dbNiimko); $specializations = ContingentManager::getInstance()->getSpecializations($dbNiimko); $sql = 'SELECT DISTINCT org_id FROM sveden_education_contingent'; $org = $dbOpendata->selectQuery($sql); -// print_r($sites); +print_r($sites); // print_r($specializations); // print_r($org); $orgs = []; @@ -71,9 +71,15 @@ for ($i = $start; $i < count($sites); $i++) { 'max' => 10, 'strict' => true, 'referer' => true, + 'allow_directs' => true, 'track_redirects' => true, 'headers' => [ - 'content-type' => 'text/html;', + 'User-Agent' => ' + Mozilla/5.0 (X11; Linux x86_64) + AppleWebKit/537.36 (KHTML, like Gecko) + Chrome/124.0.0.0 YaBrowser/24.6.0.0 Safari/537.36 + ', + 'Content-Type' => 'text/html;', 'charset' => 'utf-8' ] ] diff --git a/app/library/ContingentManager.php b/app/library/ContingentManager.php index 52a0d1d..49dc0ca 100644 --- a/app/library/ContingentManager.php +++ b/app/library/ContingentManager.php @@ -21,7 +21,7 @@ final class ContingentManager { // select kod as org_id, site from niimko.s_vuzes // where ootype = 'vuz' and deleted = 'n' and fake = 'n' - $params = ['vuz', 'n', 'n']; + $params = ['vuz', 'n', 'n', 'RU']; $query = $this->builder->select() ->setTable('s_vuzes') ->setColumns(['org_id' => 'kod', 'site'])