From 1d52b28e394983a8346e0ccb7ec1ed6b54dd6918 Mon Sep 17 00:00:00 2001
From: Fushihara <1039534+fushihara@users.noreply.github.com>
Date: Sat, 28 Sep 2024 19:47:44 +0900
Subject: =?UTF-8?q?=E3=82=A2=E3=83=8B=E3=83=A1=E3=81=BE=E3=81=A8=E3=82=81?=
=?UTF-8?q?=E3=81=AE=E3=83=AA=E3=83=B3=E3=82=AF=E3=82=92=E8=BF=BD=E5=8A=A0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/app/_components/archiveLinkElement.tsx | 9 +++-
src/app/_components/navigationHeader.tsx | 3 ++
src/app/anime/matome/page.tsx | 78 ++++++++++++++++++++++++++++++
src/app/iframe/page.tsx | 2 +
src/app/page.tsx | 4 +-
5 files changed, 93 insertions(+), 3 deletions(-)
create mode 100644 src/app/anime/matome/page.tsx
(limited to 'src')
diff --git a/src/app/_components/archiveLinkElement.tsx b/src/app/_components/archiveLinkElement.tsx
index d97d904..94daed5 100644
--- a/src/app/_components/archiveLinkElement.tsx
+++ b/src/app/_components/archiveLinkElement.tsx
@@ -19,8 +19,12 @@ type AnimeReviewItem = {
animeId: number,
reviewId: number,
};
+type AnimeMatome = {
+ type: "AnimeMatome",
+ matomeId: string,
+};
type Common = { showLinkUnderline?: boolean }
-type Option = (ArticlePage | AnimeTop | AnimeReviewList | AnimeReviewItem) & Common;
+type Option = (ArticlePage | AnimeTop | AnimeReviewList | AnimeReviewItem | AnimeMatome) & Common;
export function ArciveLinkElement(option: Option) {
const officialLinkTitle = `公式のakiba-souken.com へのリンク。閉鎖後は繋がらなくなるはず`;
const iaSearchResultLinkTitle = `InternetArchive の検索結果へのリンク`;
@@ -53,6 +57,9 @@ export function ArciveLinkElement(option: Option) {
} else if (option.type == "AnimeReviewItem") {
originalUrl = `https://akiba-souken.com/anime/${option.animeId}/review/${option.reviewId}`;
iframeSrc = `anime-${option.animeId}-review-${option.reviewId}`;
+ } else if (option.type == "AnimeMatome") {
+ originalUrl = `https://akiba-souken.com/anime/matome/${option.matomeId}/`;
+ iframeSrc = `anime-matome-${option.matomeId}`;
} else {
throw new Error();
}
diff --git a/src/app/_components/navigationHeader.tsx b/src/app/_components/navigationHeader.tsx
index 20cee95..7c4f4f3 100644
--- a/src/app/_components/navigationHeader.tsx
+++ b/src/app/_components/navigationHeader.tsx
@@ -24,6 +24,9 @@ export function NavigationHeader() {
アニメ一覧
+
+ アニメまとめ
+
diff --git a/src/app/anime/matome/page.tsx b/src/app/anime/matome/page.tsx
new file mode 100644
index 0000000..5437707
--- /dev/null
+++ b/src/app/anime/matome/page.tsx
@@ -0,0 +1,78 @@
+import dateformat from "dateformat";
+import { AnimeLoader, AnimeLoaderData } from "../../../util/animeLoader";
+import { ArciveLinkElement } from "../../_components/archiveLinkElement";
+dateformat.i18n.dayNames = [
+ '日', '月', '火', '水', '木', '金', '土',
+ '日曜日', '月曜日', '火曜日', '水曜日', '木曜日', '金曜日', '土曜日'
+];
+type PageType = {
+ searchParams: Record,
+ params: { animeId: string, }
+}
+export async function generateMetadata(context: PageType) {
+ const loadedData = await AnimeLoader.instance.loadData().then(d => {
+ const r = d.find(a => a.animeId == Number(context.params.animeId))!;
+ return r;
+ });
+ return {
+ title: `アキバ総研アーカイブ:アニメまとめ`,
+ }
+}
+export default async function Page(context: PageType) {
+ const className = "flex gap-4";
+ return (
+
+
+ - {ArciveLinkElement({ type: "AnimeMatome", matomeId: "anison", showLinkUnderline: true, })}:アニソンまとめ
+ - {ArciveLinkElement({ type: "AnimeMatome", matomeId: "kami_anime", showLinkUnderline: true, })}:神アニメまとめ
+ - {ArciveLinkElement({ type: "AnimeMatome", matomeId: "akuyaku", showLinkUnderline: true, })}:悪役令嬢アニメまとめ
+ - {ArciveLinkElement({ type: "AnimeMatome", matomeId: "tsukkomi", showLinkUnderline: true, })}:ツッコミアニメまとめ
+ - {ArciveLinkElement({ type: "AnimeMatome", matomeId: "binge_watching", showLinkUnderline: true, })}:一気見アニメまとめ
+ - {ArciveLinkElement({ type: "AnimeMatome", matomeId: "youjo", showLinkUnderline: true, })}:幼女アニメまとめ
+ - {ArciveLinkElement({ type: "AnimeMatome", matomeId: "kuso", showLinkUnderline: true, })}:クソアニメまとめ
+ - {ArciveLinkElement({ type: "AnimeMatome", matomeId: "emo", showLinkUnderline: true, })}:エモいアニメまとめ
+ - {ArciveLinkElement({ type: "AnimeMatome", matomeId: "work", showLinkUnderline: true, })}:お仕事アニメまとめ
+ - {ArciveLinkElement({ type: "AnimeMatome", matomeId: "80s", showLinkUnderline: true, })}:懐かしいアニメまとめ
+ - {ArciveLinkElement({ type: "AnimeMatome", matomeId: "adventure", showLinkUnderline: true, })}:冒険ファンタジーアニメまとめ
+ - {ArciveLinkElement({ type: "AnimeMatome", matomeId: "journey", showLinkUnderline: true, })}:旅アニメまとめ
+ - {ArciveLinkElement({ type: "AnimeMatome", matomeId: "sexy", showLinkUnderline: true, })}:セクシーアニメまとめ
+ - {ArciveLinkElement({ type: "AnimeMatome", matomeId: "isekai", showLinkUnderline: true, })}:異世界アニメまとめ
+ - {ArciveLinkElement({ type: "AnimeMatome", matomeId: "renai", showLinkUnderline: true, })}:恋愛アニメ(マンガ原作)まとめ
+ - {ArciveLinkElement({ type: "AnimeMatome", matomeId: "seisyun", showLinkUnderline: true, })}:青春アニメまとめ
+ - {ArciveLinkElement({ type: "AnimeMatome", matomeId: "stronghero", showLinkUnderline: true, })}:主人公最強アニメまとめ
+ - {ArciveLinkElement({ type: "AnimeMatome", matomeId: "battle", showLinkUnderline: true, })}:バトルアニメまとめ
+ - {ArciveLinkElement({ type: "AnimeMatome", matomeId: "90s", showLinkUnderline: true, })}:90年代アニメまとめ
+ - {ArciveLinkElement({ type: "AnimeMatome", matomeId: "harem", showLinkUnderline: true, })}:ハーレムアニメまとめ
+ - {ArciveLinkElement({ type: "AnimeMatome", matomeId: "gag", showLinkUnderline: true, })}:ギャグアニメまとめ
+ - {ArciveLinkElement({ type: "AnimeMatome", matomeId: "nakeru", showLinkUnderline: true, })}:泣けるアニメまとめ
+ - {ArciveLinkElement({ type: "AnimeMatome", matomeId: "guro", showLinkUnderline: true, })}:グロアニメまとめ
+ - {ArciveLinkElement({ type: "AnimeMatome", matomeId: "horror", showLinkUnderline: true, })}:ホラーアニメまとめ
+ - {ArciveLinkElement({ type: "AnimeMatome", matomeId: "utu", showLinkUnderline: true, })}:鬱アニメまとめ
+ - {ArciveLinkElement({ type: "AnimeMatome", matomeId: "eiga", showLinkUnderline: true, })}:アニメ映画まとめ
+ - {ArciveLinkElement({ type: "AnimeMatome", matomeId: "yuri", showLinkUnderline: true, })}:百合アニメまとめ
+ - {ArciveLinkElement({ type: "AnimeMatome", matomeId: "bl", showLinkUnderline: true, })}:BLアニメ(ボーイズラブ)まとめ
+ - {ArciveLinkElement({ type: "AnimeMatome", matomeId: "otome", showLinkUnderline: true, })}:乙女アニメ(ゲーム原作)まとめ
+ - {ArciveLinkElement({ type: "AnimeMatome", matomeId: "otona", showLinkUnderline: true, })}:大人向けアニメまとめ
+ - {ArciveLinkElement({ type: "AnimeMatome", matomeId: "nichijou", showLinkUnderline: true, })}:日常系アニメまとめ
+ - {ArciveLinkElement({ type: "AnimeMatome", matomeId: "lightnovel", showLinkUnderline: true, })}:ラノベアニメまとめ
+ - {ArciveLinkElement({ type: "AnimeMatome", matomeId: "moe", showLinkUnderline: true, })}:萌えアニメまとめ
+ - {ArciveLinkElement({ type: "AnimeMatome", matomeId: "short", showLinkUnderline: true, })}:ショートアニメまとめ
+ - {ArciveLinkElement({ type: "AnimeMatome", matomeId: "imouto", showLinkUnderline: true, })}:妹アニメまとめ
+ - {ArciveLinkElement({ type: "AnimeMatome", matomeId: "dark", showLinkUnderline: true, })}:ダークファンタジーアニメまとめ
+ - {ArciveLinkElement({ type: "AnimeMatome", matomeId: "ikemen", showLinkUnderline: true, })}:イケメンアニメまとめ
+ - {ArciveLinkElement({ type: "AnimeMatome", matomeId: "timeleap", showLinkUnderline: true, })}:タイムリープアニメまとめ
+ - {ArciveLinkElement({ type: "AnimeMatome", matomeId: "zombie", showLinkUnderline: true, })}:ゾンビアニメまとめ
+ - {ArciveLinkElement({ type: "AnimeMatome", matomeId: "key", showLinkUnderline: true, })}:Keyアニメまとめ
+ - {ArciveLinkElement({ type: "AnimeMatome", matomeId: "survival", showLinkUnderline: true, })}:サバイバルアニメまとめ
+ - {ArciveLinkElement({ type: "AnimeMatome", matomeId: "gourmet", showLinkUnderline: true, })}:グルメアニメまとめ
+ - {ArciveLinkElement({ type: "AnimeMatome", matomeId: "tsundere", showLinkUnderline: true, })}:ツンデレアニメまとめ
+ - {ArciveLinkElement({ type: "AnimeMatome", matomeId: "future", showLinkUnderline: true, })}:近未来アニメまとめ
+ - {ArciveLinkElement({ type: "AnimeMatome", matomeId: "esp", showLinkUnderline: true, })}:超能力アニメまとめ
+ - {ArciveLinkElement({ type: "AnimeMatome", matomeId: "idol", showLinkUnderline: true, })}:アイドルアニメまとめ
+ - {ArciveLinkElement({ type: "AnimeMatome", matomeId: "yokai", showLinkUnderline: true, })}:妖怪アニメまとめ
+ - {ArciveLinkElement({ type: "AnimeMatome", matomeId: "sengoku", showLinkUnderline: true, })}:戦国時代アニメまとめ
+ - {ArciveLinkElement({ type: "AnimeMatome", matomeId: "musical", showLinkUnderline: true, })}:ミュージカルアニメまとめ
+
+
+ );
+}
diff --git a/src/app/iframe/page.tsx b/src/app/iframe/page.tsx
index e26e921..985671a 100644
--- a/src/app/iframe/page.tsx
+++ b/src/app/iframe/page.tsx
@@ -47,6 +47,8 @@ function parseParam(paramString: string) {
return `https://akiba-souken.com/anime/${m[1]}/review/?page=${m[2]}`;
} else if (m = paramString.match(/^anime-(\d+)-review-(\d+)$/)) {
return `https://akiba-souken.com/anime/${m[1]}/review/${m[2]}/`;
+ } else if (m = paramString.match(/^anime-matome-(.+?)$/)) {
+ return `https://akiba-souken.com/anime/matome/${m[1]}/`;
}
return null;
}
diff --git a/src/app/page.tsx b/src/app/page.tsx
index 58a7429..2ca4873 100644
--- a/src/app/page.tsx
+++ b/src/app/page.tsx
@@ -21,10 +21,10 @@ export default function Home() {
https://github.com/fushihara/akiba-souken-archive
このサイトの記事一覧などが欲しい場合は、スクレイピングをするより上記レポジトリからファイルを落としたほうが早いです。
スクレイピングに使ったツール一式は以下の通りです。こちらのスクリプトはdenoを使っています。DLしたhtmlをsqliteに保存して、同じ内容で複数アクセスが起きないように工夫しています。
- xxxxx
+ https://github.com/fushihara/akiba-souken-crawler
このアーカイブサイトは閉鎖決定時点の全てのコンテンツを網羅している訳ではありません。
- 通常のarticle形式以外の、投票( https://akiba-souken.com/vote/ )やアニメまとめ( https://akiba-souken.com/anime/matome/ )、アニメランキング( https://akiba-souken.com/anime/ranking/ )は抜けています。
+ 通常のarticle形式以外の、投票( https://akiba-souken.com/vote/ )、アニメランキング( https://akiba-souken.com/anime/ranking/ )は抜けています。
);
}
--
cgit v1.2.3