From 5e0202ba310cd0f2dd814efc01525a6c014aacdf Mon Sep 17 00:00:00 2001 From: uduki Date: Sat, 2 May 2026 20:15:29 +0900 Subject: [PATCH] =?UTF-8?q?=E3=82=B3=E3=83=A1=E3=83=B3=E3=83=88=E8=AA=BF?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- RSSAPI/Program.cs | 3 --- 1 file changed, 3 deletions(-) diff --git a/RSSAPI/Program.cs b/RSSAPI/Program.cs index dab6535..4e08df0 100644 --- a/RSSAPI/Program.cs +++ b/RSSAPI/Program.cs @@ -337,7 +337,6 @@ app.MapGet("/missav123", async () => // --- APIエンドポイントの定義 --- app.MapGet("/momonga/fanzine", async (HttpContext context, IHttpClientFactory httpClientFactory) => { - // 1. 取得対象のURLを10件定義(例として連番パラメーターを生成) var linkList = new List(); var pageMaster = "https://momon-ga.com/fanzine"; for (int pageId = 1; pageId <= 50; pageId++) @@ -356,7 +355,6 @@ app.MapGet("/momonga/fanzine", async (HttpContext context, IHttpClientFactory ht var client = httpClientFactory.CreateClient(); - // 2. 10件のRSSを「非同期」かつ「並列」で取得し、メモリに展開せずストリームのままパース var fetchTasks = linkList.Select(async url => { try @@ -375,7 +373,6 @@ app.MapGet("/momonga/fanzine", async (HttpContext context, IHttpClientFactory ht } }); - // 3. 全10件の通信完了を待機し、結果のリストを1つに平坦化 (SelectMany) var results = await Task.WhenAll(fetchTasks); var allItems = results.SelectMany(items => items).ToList();