From 84af1913c50e347506600d83ea5d025c95238a51 Mon Sep 17 00:00:00 2001 From: Maxim Slipenko Date: Sat, 21 Dec 2024 14:45:30 +0300 Subject: [PATCH] fix update script --- scripts/update.js | 2 +- scripts/update/globalExpress.js | 2 +- scripts/update/ozon-wb-dpr.js | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/update.js b/scripts/update.js index b55bbb8..393428f 100644 --- a/scripts/update.js +++ b/scripts/update.js @@ -7,7 +7,7 @@ import { async function main() { await woyag(); - // - await sevenDostavka(); + // await sevenDostavka(); await ozonWbDpr(); await globalExpress(); } diff --git a/scripts/update/globalExpress.js b/scripts/update/globalExpress.js index 23da3d7..98a1137 100644 --- a/scripts/update/globalExpress.js +++ b/scripts/update/globalExpress.js @@ -181,7 +181,7 @@ async function globalExpress() { source: MAIN_URL, points: points.map((p) => ({ ...p, - operationTime: `ГРАФИК РАБОТЫ`, + operationTime: `ГРАФИК РАБОТЫ`, })), }, undefined, diff --git a/scripts/update/ozon-wb-dpr.js b/scripts/update/ozon-wb-dpr.js index 2381d40..0fe4339 100644 --- a/scripts/update/ozon-wb-dpr.js +++ b/scripts/update/ozon-wb-dpr.js @@ -83,8 +83,8 @@ async function getFromSite() { const scripts = document.querySelectorAll("script"); for (let script of scripts) { - if (script.textContent.includes('descr: "Бесплатный озон')) { - let x = script.textContent.split("[\n{\n").pop().split("\n},\n]")[0]; + if (script.textContent.includes('descr:"Бесплатный озон')) { + let x = script.textContent.split("[{").pop().split("},]")[0]; if (x) { const points = new Function(`return [{${x}}]`)();