summaryrefslogtreecommitdiff
path: root/app/scrapers/fever-shindaita.ts
diff options
context:
space:
mode:
authoryyamashita <yyamashita@mosquit.one>2026-05-10 23:22:17 +0900
committeryyamashita <yyamashita@mosquit.one>2026-05-10 23:22:17 +0900
commitb56e79b5b288b7c9e2fef396b303afc32c9baf5d (patch)
tree28080f7f019889659ef1682f4d3661ed9650da54 /app/scrapers/fever-shindaita.ts
parent05d2b35a85a46dde9a1264d3002ba86e02e3d5eb (diff)
Fix multi-month scrape coverage and add duo MUSIC EXCHANGE
- Extend 8 scrapers (liquid-room, shibuya-o, club-quattro, meets-otsuka, nishieifuku-jam, fever-shindaita, fad-yokohama, and new duo-music-exchange) to fetch 3 calendar months instead of 1-2, covering the full 65-day window - Add duo MUSIC EXCHANGE scraper (渋谷, ~700 cap, /schedule/YYYY/index_YYYY-MM.html) - Add npm test: Node.js built-in test runner verifies each scraper fetches all required month URLs via mocked fetch (10 tests, no extra deps) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'app/scrapers/fever-shindaita.ts')
-rw-r--r--app/scrapers/fever-shindaita.ts12
1 files changed, 6 insertions, 6 deletions
diff --git a/app/scrapers/fever-shindaita.ts b/app/scrapers/fever-shindaita.ts
index 62c2e2c..6356343 100644
--- a/app/scrapers/fever-shindaita.ts
+++ b/app/scrapers/fever-shindaita.ts
@@ -108,11 +108,11 @@ export const scraper: Scraper = {
venue,
async scrape(): Promise<EventInput[]> {
const now = new Date();
- const thisMonth = `${now.getFullYear()}-${String(now.getMonth() + 1).padStart(2, "0")}`;
- const next = new Date(now.getFullYear(), now.getMonth() + 1, 1);
- const nextMonth = `${next.getFullYear()}-${String(next.getMonth() + 1).padStart(2, "0")}`;
-
- const [a, b] = await Promise.all([scrapeMonth(thisMonth), scrapeMonth(nextMonth)]);
- return [...a, ...b];
+ const months = [0, 1, 2].map((offset) => {
+ const d = new Date(now.getFullYear(), now.getMonth() + offset, 1);
+ return `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, "0")}`;
+ });
+ const results = await Promise.all(months.map(scrapeMonth));
+ return results.flat();
},
};