From e2501e3cc351f15cbdc9d90c3cdbaa2a692c5b00 Mon Sep 17 00:00:00 2001 From: proshunsuke Date: Sun, 18 Apr 2021 05:30:08 +0900 Subject: [PATCH] =?UTF-8?q?=E4=BD=95=E3=82=82=E6=8C=87=E5=AE=9A=E3=81=97?= =?UTF-8?q?=E3=81=AA=E3=81=84=E3=81=A8=E3=82=A8=E3=83=A9=E3=83=BC=E3=81=AB?= =?UTF-8?q?=E3=81=AA=E3=82=8B=E3=81=AE=E3=81=A7=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gcpFunctions/getSakuraSchedule.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcpFunctions/getSakuraSchedule.js b/gcpFunctions/getSakuraSchedule.js index a5c4641..9a328ab 100644 --- a/gcpFunctions/getSakuraSchedule.js +++ b/gcpFunctions/getSakuraSchedule.js @@ -15,8 +15,8 @@ exports.getSakuraSchedule = async (req, res) => { await page.setUserAgent('Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1'); - const date = req.query['date']; - const url = 'https://sakurazaka46.com/s/s46/media/list?ima=5250&dy=' + date.substring(0, date.length - 2); + const date = req.query['date'] ? date.substring(0, date.length - 2) : ''; + const url = 'https://sakurazaka46.com/s/s46/media/list?ima=5250&dy=' + date; await page.goto(url); const modalScheduleDetails = await page.$$('.module-modal.js-schedule-detail');