summaryrefslogtreecommitdiff
path: root/app/scrapers/flat-nishiogikubo.ts
blob: 03cc70c3a3a78a42f55fc13d4ca90ebf50c5bc12 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/**
 * FLAT 西荻窪 — https://www.flat.rinky.info/schedule
 *
 * ⚠️  Wix サイトのためクライアントサイド JS レンダリング。
 *      静的 fetch ではイベントデータを取得できない。
 *
 * 代替案:
 *   - Playwright/Puppeteer でヘッドレスブラウザを使用
 *   - Wix Events API (要サイトオーナーによる API キー発行)
 *
 * 現在は空配列を返す(エラーにはしない)。
 */
import type { Scraper, VenueMeta } from "./base";
import type { EventInput } from "~/lib/db.server";

export const venue: VenueMeta = {
  id: "flat-nishiogikubo",
  name: "FLAT 西荻窪",
  url: "https://www.flat.rinky.info",
  area: "西荻窪",
};

export const scraper: Scraper = {
  venue,
  async scrape(): Promise<EventInput[]> {
    // Wix renders events with JavaScript; static fetch returns an empty calendar.
    // TODO: Replace with a headless browser implementation (e.g. Playwright).
    throw new Error(
      "FLAT 西荻窪 は Wix サイトのため JS レンダリングが必要です。" +
        "ヘッドレスブラウザ(Playwright 等)への移行が必要です。"
    );
  },
};