summaryrefslogtreecommitdiff
path: root/app/routes/events._index.tsx
diff options
context:
space:
mode:
authoryyamashita <yyamashita@mosquit.one>2026-05-07 10:16:43 +0900
committeryyamashita <yyamashita@mosquit.one>2026-05-07 10:16:43 +0900
commit0cd5fb770ca9bd3f304d9556a4b33a4ad4f45e7e (patch)
treeaa316c21d7195689d87669338373d83b0b6ac3fb /app/routes/events._index.tsx
parent538fd636e25595d88a958344d285c0e7cf44e530 (diff)
Playwright scraping for FLAT/Pitbar; web UI display-only
- Install Playwright + Chromium; add shared browser singleton (playwright.server.ts) - Rewrite flat-nishiogikubo scraper: Wix calendar via headless browser, month navigation via date picker, extracts .WPczEB/.ExCBIq selectors - Rewrite pitbar-nishiogikubo scraper: freecalend.com via headless browser, parses cal-{member}-{year}-{month}-{day} cell IDs - scraper-runner: close shared browser after each run with closeBrowser() - Remove all scrape trigger buttons from web UI (events index, venues page); remove /api/scrape and /api/scrape-status from routes.ts Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'app/routes/events._index.tsx')
-rw-r--r--app/routes/events._index.tsx14
1 files changed, 3 insertions, 11 deletions
diff --git a/app/routes/events._index.tsx b/app/routes/events._index.tsx
index 3ff441a..1917ace 100644
--- a/app/routes/events._index.tsx
+++ b/app/routes/events._index.tsx
@@ -1,4 +1,4 @@
-import { useLoaderData, useSearchParams, Form, Link } from "react-router";
+import { useLoaderData, useSearchParams, Link } from "react-router";
import type { Route } from "./+types/events._index";
import { queryEvents, getVenues } from "~/lib/db.server";
import EventCard from "~/components/EventCard";
@@ -49,16 +49,8 @@ export default function EventsIndex() {
</header>
<main className="max-w-6xl mx-auto px-4 py-8">
- <div className="mb-6 flex items-center justify-between">
+ <div className="mb-6">
<h1 className="text-2xl font-bold">イベント一覧</h1>
- <Form method="post" action="/api/scrape">
- <button
- type="submit"
- className="rounded-md bg-indigo-600 px-4 py-2 text-sm font-medium hover:bg-indigo-500 transition-colors"
- >
- 情報を更新
- </button>
- </Form>
</div>
<FilterBar venues={venues} defaultDateFrom={date_from} defaultDateTo={date_to} />
@@ -66,7 +58,7 @@ export default function EventsIndex() {
{events.length === 0 ? (
<div className="mt-16 text-center text-gray-500">
<p className="text-lg">イベントが見つかりません</p>
- <p className="mt-2 text-sm">「情報を更新」ボタンでデータを取得してください。</p>
+ <p className="mt-2 text-sm">スクレイパーを実行してデータを取得してください: <code>npm run scrape</code></p>
</div>
) : (
<div className="mt-6 grid gap-4 sm:grid-cols-2 lg:grid-cols-3">