summaryrefslogtreecommitdiff
path: root/app/scrapers/fever-shindaita.ts
diff options
context:
space:
mode:
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();
},
};