summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/scrapers/marz-shinjuku.ts3
-rw-r--r--scripts/scraper-entrypoint.sh3
2 files changed, 3 insertions, 3 deletions
diff --git a/app/scrapers/marz-shinjuku.ts b/app/scrapers/marz-shinjuku.ts
index 06c0bcc..b03f23c 100644
--- a/app/scrapers/marz-shinjuku.ts
+++ b/app/scrapers/marz-shinjuku.ts
@@ -26,7 +26,8 @@ export const venue: VenueMeta = {
async function scrapeMonth(year: number, month: number): Promise<EventInput[]> {
const url = `http://www.marz.jp/schedule/${year}/${String(month).padStart(2, "0")}/`;
const res = await fetch(url);
- if (!res.ok) throw new Error(`HTTP ${res.status} for ${url}`);
+ // 404/500 = schedule not yet published for that month
+ if (!res.ok) return [];
const $ = cheerio.load(await res.text());
const events: EventInput[] = [];
diff --git a/scripts/scraper-entrypoint.sh b/scripts/scraper-entrypoint.sh
index 87bc0c8..6443de4 100644
--- a/scripts/scraper-entrypoint.sh
+++ b/scripts/scraper-entrypoint.sh
@@ -1,6 +1,5 @@
#!/bin/sh
-set -e
-node --import tsx/esm scripts/scrape.ts
+node --import tsx/esm scripts/scrape.ts || echo "[entrypoint] initial scrape failed (exit $?), cron will retry"
exec cron -f