Skip to content
This repository has been archived by the owner on Mar 8, 2024. It is now read-only.

Commit

Permalink
Merge pull request #44 from proshunsuke/v9
Browse files Browse the repository at this point in the history
何も指定しないとエラーになるので修正
  • Loading branch information
proshunsuke authored Apr 17, 2021
2 parents c124ebc + e2501e3 commit 8de98e1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gcpFunctions/getSakuraSchedule.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit 8de98e1

Please sign in to comment.