feat: VJAV/LAXD/FC2/XVIDEOS等の登録動画サイトの埋め込み再生を最優先化
This commit is contained in:
1 parent
c40d93b2b3
commit
3df8a7c244
3 files changed
+266
-12
No files matched your search
@@ -1785,7 +1785,110 @@ public static class HtmlRenderer
|
||||
string? title = null)
|
||||
{
|
||||
var normalizedSite = (site ?? "video").Trim().ToLowerInvariant();
|
||||
var safeId = Encoder.Encode(videoId.Trim());
|
||||
var safeId = Encoder.Encode(videoId?.Trim() ?? "video");
|
||||
|
||||
// originalUrl からのサイトおよびIDの自動救済(サイト名がvideoまたはsafeIdがvideo/未解決の場合)
|
||||
if (!string.IsNullOrWhiteSpace(originalUrl) && (normalizedSite == "video" || safeId == "video" || string.IsNullOrWhiteSpace(playerUrl)))
|
||||
{
|
||||
if (originalUrl.Contains("vjav.com", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
normalizedSite = "vjav";
|
||||
var m = System.Text.RegularExpressions.Regex.Match(originalUrl, @"/videos/([0-9]+)");
|
||||
if (m.Success) safeId = m.Groups[1].Value;
|
||||
playerUrl ??= $"https://vjav.com/embed/{safeId}/";
|
||||
}
|
||||
else if (originalUrl.Contains("video.laxd.com", StringComparison.OrdinalIgnoreCase) || originalUrl.Contains("laxd.com", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
normalizedSite = "laxd";
|
||||
var m = System.Text.RegularExpressions.Regex.Match(originalUrl, @"laxd\.com/(?:a/content/|content/|embed/)?([0-9a-zA-Z_\-]+)");
|
||||
if (m.Success) safeId = m.Groups[1].Value;
|
||||
playerUrl ??= $"https://video.laxd.com/a/embed/player/{safeId}/";
|
||||
}
|
||||
else if (originalUrl.Contains("contents.fc2.com", StringComparison.OrdinalIgnoreCase) || originalUrl.Contains("video.fc2.com", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
normalizedSite = "fc2";
|
||||
var m = System.Text.RegularExpressions.Regex.Match(originalUrl, @"(?:article/|aid=|content/|video/)([0-9a-zA-Z_\-]+)");
|
||||
if (m.Success) safeId = m.Groups[1].Value;
|
||||
playerUrl ??= $"https://video.fc2.com/a/embed/player/{safeId}/";
|
||||
}
|
||||
else if (originalUrl.Contains("xvideos.com", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
normalizedSite = "xvideos";
|
||||
var m = System.Text.RegularExpressions.Regex.Match(originalUrl, @"(?:video\.|video|embedframe/)([0-9]+)");
|
||||
if (m.Success) safeId = m.Groups[1].Value;
|
||||
playerUrl ??= $"https://www.xvideos.com/embedframe/{safeId}";
|
||||
}
|
||||
else if (originalUrl.Contains("inporn.com", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
normalizedSite = "inporn";
|
||||
var m = System.Text.RegularExpressions.Regex.Match(originalUrl, @"/video/([0-9]+)");
|
||||
if (m.Success) safeId = m.Groups[1].Value;
|
||||
playerUrl ??= $"https://inporn.com/embed/{safeId}/";
|
||||
}
|
||||
else if (originalUrl.Contains("bdsmx.tube", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
normalizedSite = "bdsmx";
|
||||
var m = System.Text.RegularExpressions.Regex.Match(originalUrl, @"/video/([0-9]+)");
|
||||
if (m.Success) safeId = m.Groups[1].Value;
|
||||
playerUrl ??= $"https://bdsmx.tube/embed/{safeId}/";
|
||||
}
|
||||
else if (originalUrl.Contains("senzuri.tube", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
normalizedSite = "senzuri";
|
||||
var m = System.Text.RegularExpressions.Regex.Match(originalUrl, @"/videos/([0-9]+)");
|
||||
if (m.Success) safeId = m.Groups[1].Value;
|
||||
playerUrl ??= $"https://senzuri.tube/embed/{safeId}/";
|
||||
}
|
||||
else if (originalUrl.Contains("txxx.com", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
normalizedSite = "txxx";
|
||||
var m = System.Text.RegularExpressions.Regex.Match(originalUrl, @"/videos/([0-9]+)");
|
||||
if (m.Success) safeId = m.Groups[1].Value;
|
||||
playerUrl ??= $"https://www.txxx.com/embed/{safeId}/";
|
||||
}
|
||||
else if (originalUrl.Contains("hclips.com", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
normalizedSite = "hclips";
|
||||
var m = System.Text.RegularExpressions.Regex.Match(originalUrl, @"/videos/([0-9]+)");
|
||||
if (m.Success) safeId = m.Groups[1].Value;
|
||||
playerUrl ??= $"https://www.hclips.com/embed/{safeId}/";
|
||||
}
|
||||
else if (originalUrl.Contains("hdzog.com", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
normalizedSite = "hdzog";
|
||||
var m = System.Text.RegularExpressions.Regex.Match(originalUrl, @"/videos/([0-9]+)");
|
||||
if (m.Success) safeId = m.Groups[1].Value;
|
||||
playerUrl ??= $"https://www.hdzog.com/embed/{safeId}/";
|
||||
}
|
||||
else if (originalUrl.Contains("upornia.com", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
normalizedSite = "upornia";
|
||||
var m = System.Text.RegularExpressions.Regex.Match(originalUrl, @"/videos/([0-9]+)");
|
||||
if (m.Success) safeId = m.Groups[1].Value;
|
||||
playerUrl ??= $"https://upornia.com/embed/{safeId}/";
|
||||
}
|
||||
else if (originalUrl.Contains("youjizz.com", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
normalizedSite = "youjizz";
|
||||
var m = System.Text.RegularExpressions.Regex.Match(originalUrl, @"/videos/([0-9]+)");
|
||||
if (m.Success) safeId = m.Groups[1].Value;
|
||||
playerUrl ??= $"https://www.youjizz.com/embed/{safeId}";
|
||||
}
|
||||
else if (originalUrl.Contains("spankbang.com", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
normalizedSite = "spankbang";
|
||||
var m = System.Text.RegularExpressions.Regex.Match(originalUrl, @"(?:jp\.)?spankbang\.com/([a-zA-Z0-9]+)");
|
||||
if (m.Success) safeId = m.Groups[1].Value;
|
||||
playerUrl ??= $"https://spankbang.com/{safeId}/embed/";
|
||||
}
|
||||
else if (originalUrl.Contains("123av.com", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
normalizedSite = "123av";
|
||||
var m = System.Text.RegularExpressions.Regex.Match(originalUrl, @"video/([a-zA-Z0-9_-]+)");
|
||||
if (m.Success) safeId = m.Groups[1].Value;
|
||||
playerUrl ??= $"https://javplayer.cc/v/{safeId}";
|
||||
}
|
||||
}
|
||||
|
||||
// サイト別の設定(名称、バッジ、グラデーション、プライマリカラー)
|
||||
string siteDisplayName;
|
||||
@@ -1836,13 +1939,26 @@ public static class HtmlRenderer
|
||||
defaultOrigUrl = $"https://do-ga.eroterest.net/video/detail/{safeId}/";
|
||||
break;
|
||||
|
||||
case "vjav":
|
||||
case "vjav.com":
|
||||
siteDisplayName = "VJAV";
|
||||
badgeText = "VJAV VIDEO";
|
||||
accentGradient = "linear-gradient(135deg, #e11d48 0%, #be123c 100%)";
|
||||
accentPrimary = "#e11d48";
|
||||
glowColor = "rgba(225, 29, 72, 0.3)";
|
||||
defaultOrigUrl = originalUrl ?? $"https://vjav.com/videos/{safeId}/";
|
||||
playerUrl ??= $"https://vjav.com/embed/{safeId}/";
|
||||
break;
|
||||
|
||||
case "laxd":
|
||||
case "video.laxd.com":
|
||||
siteDisplayName = "LAXD";
|
||||
badgeText = "LAXD VIDEO";
|
||||
accentGradient = "linear-gradient(135deg, #f59e0b 0%, #d97706 100%)";
|
||||
accentPrimary = "#f59e0b";
|
||||
glowColor = "rgba(245, 158, 11, 0.3)";
|
||||
defaultOrigUrl = $"https://video.laxd.com/a/content/{safeId}";
|
||||
defaultOrigUrl = originalUrl ?? $"https://video.laxd.com/a/content/{safeId}";
|
||||
playerUrl ??= $"https://video.laxd.com/a/embed/player/{safeId}/";
|
||||
break;
|
||||
|
||||
case "upornia":
|
||||
@@ -1944,12 +2060,14 @@ public static class HtmlRenderer
|
||||
|
||||
case "fc2":
|
||||
case "fc2video":
|
||||
case "video.fc2.com":
|
||||
siteDisplayName = "FC2動画";
|
||||
badgeText = "FC2 VIDEO";
|
||||
accentGradient = "linear-gradient(135deg, #10b981 0%, #059669 100%)";
|
||||
accentPrimary = "#10b981";
|
||||
glowColor = "rgba(16, 185, 129, 0.3)";
|
||||
defaultOrigUrl = originalUrl ?? $"https://adult.contents.fc2.com/article/{safeId}/";
|
||||
playerUrl ??= $"https://video.fc2.com/a/embed/player/{safeId}/";
|
||||
break;
|
||||
|
||||
|
||||
@@ -2262,6 +2380,7 @@ public static class HtmlRenderer
|
||||
class="player-iframe"
|
||||
frameborder="0"
|
||||
scrolling="no"
|
||||
referrerpolicy="no-referrer-when-downgrade"
|
||||
allowfullscreen="true"
|
||||
webkitallowfullscreen="true"
|
||||
mozallowfullscreen="true"
|
||||
|
||||
@@ -265,6 +265,70 @@ public class VideoUrlResolver
|
||||
};
|
||||
}
|
||||
|
||||
// VJAV
|
||||
if (url.Contains("vjav.com", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
var match = Regex.Match(url, @"/videos/([0-9]+)");
|
||||
var id = match.Success ? match.Groups[1].Value : "video";
|
||||
return new ResolvedVideoResult
|
||||
{
|
||||
Site = "vjav",
|
||||
VideoId = id,
|
||||
PlayerUrl = $"https://vjav.com/embed/{id}/",
|
||||
OriginalUrl = url,
|
||||
Title = title ?? $"VJAV 動画 ({id})",
|
||||
IsSuccess = true
|
||||
};
|
||||
}
|
||||
|
||||
// LAXD
|
||||
if (url.Contains("video.laxd.com", StringComparison.OrdinalIgnoreCase) || url.Contains("laxd.com", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
var match = Regex.Match(url, @"(?:/a/content/|/content/|/embed/)([0-9a-zA-Z_\-]+)");
|
||||
var id = match.Success ? match.Groups[1].Value : "video";
|
||||
return new ResolvedVideoResult
|
||||
{
|
||||
Site = "laxd",
|
||||
VideoId = id,
|
||||
PlayerUrl = $"https://video.laxd.com/a/embed/player/{id}/",
|
||||
OriginalUrl = url,
|
||||
Title = title ?? $"LAXD 動画 ({id})",
|
||||
IsSuccess = true
|
||||
};
|
||||
}
|
||||
|
||||
// FC2動画
|
||||
if (url.Contains("contents.fc2.com", StringComparison.OrdinalIgnoreCase) || url.Contains("video.fc2.com", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
var match = Regex.Match(url, @"(?:article/|aid=|content/)([0-9a-zA-Z_\-]+)");
|
||||
var id = match.Success ? match.Groups[1].Value : "video";
|
||||
return new ResolvedVideoResult
|
||||
{
|
||||
Site = "fc2",
|
||||
VideoId = id,
|
||||
PlayerUrl = $"https://video.fc2.com/a/embed/player/{id}/",
|
||||
OriginalUrl = url,
|
||||
Title = title ?? $"FC2 動画 ({id})",
|
||||
IsSuccess = true
|
||||
};
|
||||
}
|
||||
|
||||
// XVIDEOS
|
||||
if (url.Contains("xvideos.com", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
var match = Regex.Match(url, @"(?:video\.|video)([0-9]+)");
|
||||
var id = match.Success ? match.Groups[1].Value : "video";
|
||||
return new ResolvedVideoResult
|
||||
{
|
||||
Site = "xvideos",
|
||||
VideoId = id,
|
||||
PlayerUrl = $"https://www.xvideos.com/embedframe/{id}",
|
||||
OriginalUrl = url,
|
||||
Title = title ?? $"XVIDEOS 動画 ({id})",
|
||||
IsSuccess = true
|
||||
};
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -318,14 +382,22 @@ public class VideoUrlResolver
|
||||
}
|
||||
}
|
||||
|
||||
// 1. 【最重要】「動画の再生はこちらから」リンクを探索 (galgaldoga等)
|
||||
// 1. 【最重要】「動画の再生はこちらから」等のリンクを探索 (galgaldoga、まとめブログ等)
|
||||
string? candidateVideoUrl = null;
|
||||
|
||||
// A. テキストが「動画の再生はこちらから」を含む a タグ
|
||||
var playTextLinks = doc.DocumentNode.SelectNodes("//a[contains(text(), '動画の再生はこちらから') or contains(text(), '動画の再生')]");
|
||||
// A. テキストが「動画の再生」「動画再生」「再生はこちら」「再生は此方」「本編」等を含む a タグ(strong等のネストも検知)
|
||||
var playTextLinks = doc.DocumentNode.SelectNodes("//a[contains(., '動画の再生') or contains(., '動画再生') or contains(., '再生はこちら') or contains(., '再生は此方') or contains(., '本編') or contains(., '動画を見る') or contains(., '動画を視聴')]");
|
||||
if (playTextLinks != null && playTextLinks.Count > 0)
|
||||
{
|
||||
candidateVideoUrl = playTextLinks[0].GetAttributeValue("href", "")?.Trim();
|
||||
foreach (var node in playTextLinks)
|
||||
{
|
||||
var href = node.GetAttributeValue("href", "")?.Trim();
|
||||
if (!string.IsNullOrWhiteSpace(href) && !href.StartsWith("#") && !href.StartsWith("javascript:", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
candidateVideoUrl = href;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// B. .movie-frame 配下の a タグ
|
||||
@@ -335,10 +407,11 @@ public class VideoUrlResolver
|
||||
candidateVideoUrl = movieFrameLink?.GetAttributeValue("href", "")?.Trim();
|
||||
}
|
||||
|
||||
// C. エロタレスト記事の場合: .gotoBlog a
|
||||
// C. エロタレスト記事の場合: .gotoBlog a または まとめ記事リンク
|
||||
if (string.IsNullOrWhiteSpace(candidateVideoUrl))
|
||||
{
|
||||
var gotoBlog = doc.DocumentNode.SelectSingleNode("//div[contains(@class, 'gotoBlog')]//a[@href]");
|
||||
var gotoBlog = doc.DocumentNode.SelectSingleNode("//div[contains(@class, 'gotoBlog')]//a[@href]")
|
||||
?? doc.DocumentNode.SelectSingleNode("//div[contains(@class, 'pageDetail')]//a[contains(@href, 'blogterest') or contains(@href, 'blog')]");
|
||||
if (gotoBlog != null)
|
||||
{
|
||||
var nextBlogUrl = gotoBlog.GetAttributeValue("href", "")?.Trim();
|
||||
@@ -374,7 +447,7 @@ public class VideoUrlResolver
|
||||
}
|
||||
}
|
||||
|
||||
// E. 本文内のすべての a タグから既知の動画ホスト(inporn, bdsmx, doga, senzuri, txxx, etc.)を探索
|
||||
// E. 本文内のすべての a タグから既知の動画ホスト(vjav, laxd, fc2, inporn, bdsmx, doga, senzuri, txxx, etc.)を探索
|
||||
if (string.IsNullOrWhiteSpace(candidateVideoUrl))
|
||||
{
|
||||
var allLinks = doc.DocumentNode.SelectNodes("//a[@href]");
|
||||
@@ -385,17 +458,28 @@ public class VideoUrlResolver
|
||||
var href = a.GetAttributeValue("href", "")?.Trim();
|
||||
if (string.IsNullOrWhiteSpace(href)) continue;
|
||||
|
||||
if (href.Contains("inporn.com/video/", StringComparison.OrdinalIgnoreCase) ||
|
||||
if (href.Contains("vjav.com/videos/", StringComparison.OrdinalIgnoreCase) ||
|
||||
href.Contains("vjav.com/embed/", StringComparison.OrdinalIgnoreCase) ||
|
||||
href.Contains("inporn.com/video/", StringComparison.OrdinalIgnoreCase) ||
|
||||
href.Contains("inporn.com/embed/", StringComparison.OrdinalIgnoreCase) ||
|
||||
href.Contains("bdsmx.tube/video/", StringComparison.OrdinalIgnoreCase) ||
|
||||
href.Contains("bdsmx.tube/embed/", StringComparison.OrdinalIgnoreCase) ||
|
||||
href.Contains("do-ga.eroterest.net/video/", StringComparison.OrdinalIgnoreCase) ||
|
||||
href.Contains("senzuri.tube/videos/", StringComparison.OrdinalIgnoreCase) ||
|
||||
href.Contains("senzuri.tube/embed/", StringComparison.OrdinalIgnoreCase) ||
|
||||
href.Contains("txxx.com/videos/", StringComparison.OrdinalIgnoreCase) ||
|
||||
href.Contains("hclips.com/videos/", StringComparison.OrdinalIgnoreCase) ||
|
||||
href.Contains("hdzog.com/videos/", StringComparison.OrdinalIgnoreCase) ||
|
||||
href.Contains("upornia.com/videos/", StringComparison.OrdinalIgnoreCase) ||
|
||||
href.Contains("youjizz.com/videos/", StringComparison.OrdinalIgnoreCase) ||
|
||||
href.Contains("video.laxd.com/a/content/", StringComparison.OrdinalIgnoreCase) ||
|
||||
href.Contains("spankbang.com/", StringComparison.OrdinalIgnoreCase))
|
||||
href.Contains("video.laxd.com/", StringComparison.OrdinalIgnoreCase) ||
|
||||
href.Contains("laxd.com/", StringComparison.OrdinalIgnoreCase) ||
|
||||
href.Contains("contents.fc2.com", StringComparison.OrdinalIgnoreCase) ||
|
||||
href.Contains("video.fc2.com", StringComparison.OrdinalIgnoreCase) ||
|
||||
href.Contains("spankbang.com/", StringComparison.OrdinalIgnoreCase) ||
|
||||
href.Contains("xvideos.com/", StringComparison.OrdinalIgnoreCase) ||
|
||||
href.Contains("123av.com/", StringComparison.OrdinalIgnoreCase) ||
|
||||
href.Contains("missav", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
candidateVideoUrl = href;
|
||||
break;
|
||||
|
||||
@@ -197,6 +197,46 @@ app.MapGet("/video", async (
|
||||
return Results.Content(HtmlRenderer.RenderVideoPlayer("bdsmx", vId, play, stream, orig, title ?? $"BDSMx 動画 ({vId})"), "text/html; charset=utf-8");
|
||||
}
|
||||
|
||||
// VJAV 判定
|
||||
if (string.Equals(site, "vjav", StringComparison.OrdinalIgnoreCase) || (target != null && target.Contains("vjav.com", StringComparison.OrdinalIgnoreCase)))
|
||||
{
|
||||
var vId = (target != null ? System.Text.RegularExpressions.Regex.Match(target, @"/videos/([0-9]+)").Groups[1].Value : null);
|
||||
if (string.IsNullOrWhiteSpace(vId)) vId = id?.Trim() ?? "video";
|
||||
play ??= $"https://vjav.com/embed/{vId}/";
|
||||
var orig = (target != null && target.StartsWith("http", StringComparison.OrdinalIgnoreCase)) ? target : $"https://vjav.com/videos/{vId}/";
|
||||
return Results.Content(HtmlRenderer.RenderVideoPlayer("vjav", vId, play, stream, orig, title ?? $"VJAV 動画 ({vId})"), "text/html; charset=utf-8");
|
||||
}
|
||||
|
||||
// LAXD 判定
|
||||
if (string.Equals(site, "laxd", StringComparison.OrdinalIgnoreCase) || (target != null && (target.Contains("video.laxd.com", StringComparison.OrdinalIgnoreCase) || target.Contains("laxd.com", StringComparison.OrdinalIgnoreCase))))
|
||||
{
|
||||
var vId = (target != null ? System.Text.RegularExpressions.Regex.Match(target, @"laxd\.com/(?:a/content/|content/|embed/)?([0-9a-zA-Z_\-]+)").Groups[1].Value : null);
|
||||
if (string.IsNullOrWhiteSpace(vId)) vId = id?.Trim() ?? "video";
|
||||
play ??= $"https://video.laxd.com/a/embed/player/{vId}/";
|
||||
var orig = (target != null && target.StartsWith("http", StringComparison.OrdinalIgnoreCase)) ? target : $"https://video.laxd.com/a/content/{vId}";
|
||||
return Results.Content(HtmlRenderer.RenderVideoPlayer("laxd", vId, play, stream, orig, title ?? $"LAXD 動画 ({vId})"), "text/html; charset=utf-8");
|
||||
}
|
||||
|
||||
// FC2 判定
|
||||
if (string.Equals(site, "fc2", StringComparison.OrdinalIgnoreCase) || string.Equals(site, "fc2video", StringComparison.OrdinalIgnoreCase) || (target != null && (target.Contains("contents.fc2.com", StringComparison.OrdinalIgnoreCase) || target.Contains("video.fc2.com", StringComparison.OrdinalIgnoreCase))))
|
||||
{
|
||||
var vId = (target != null ? System.Text.RegularExpressions.Regex.Match(target, @"(?:article/|aid=|content/|video/)([0-9a-zA-Z_\-]+)").Groups[1].Value : null);
|
||||
if (string.IsNullOrWhiteSpace(vId)) vId = id?.Trim() ?? "video";
|
||||
play ??= $"https://video.fc2.com/a/embed/player/{vId}/";
|
||||
var orig = (target != null && target.StartsWith("http", StringComparison.OrdinalIgnoreCase)) ? target : $"https://adult.contents.fc2.com/article/{vId}/";
|
||||
return Results.Content(HtmlRenderer.RenderVideoPlayer("fc2", vId, play, stream, orig, title ?? $"FC2 動画 ({vId})"), "text/html; charset=utf-8");
|
||||
}
|
||||
|
||||
// XVIDEOS 判定
|
||||
if (string.Equals(site, "xvideos", StringComparison.OrdinalIgnoreCase) || (target != null && target.Contains("xvideos.com", StringComparison.OrdinalIgnoreCase)))
|
||||
{
|
||||
var vId = (target != null ? System.Text.RegularExpressions.Regex.Match(target, @"(?:video\.|video|embedframe/)([0-9]+)").Groups[1].Value : null);
|
||||
if (string.IsNullOrWhiteSpace(vId)) vId = id?.Trim() ?? "video";
|
||||
play ??= $"https://www.xvideos.com/embedframe/{vId}";
|
||||
var orig = (target != null && target.StartsWith("http", StringComparison.OrdinalIgnoreCase)) ? target : $"https://www.xvideos.com/video.{vId}/";
|
||||
return Results.Content(HtmlRenderer.RenderVideoPlayer("xvideos", vId, play, stream, orig, title ?? $"XVIDEOS 動画 ({vId})"), "text/html; charset=utf-8");
|
||||
}
|
||||
|
||||
// target が URL で site 未指定の場合のドメイン自動判定
|
||||
if (string.IsNullOrWhiteSpace(site) && target != null)
|
||||
{
|
||||
@@ -204,26 +244,37 @@ app.MapGet("/video", async (
|
||||
{
|
||||
site = "senzuri";
|
||||
id ??= System.Text.RegularExpressions.Regex.Match(target, @"/videos/([0-9]+)").Groups[1].Value;
|
||||
play ??= $"https://senzuri.tube/embed/{id}/";
|
||||
}
|
||||
else if (target.Contains("txxx.com", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
site = "txxx";
|
||||
id ??= System.Text.RegularExpressions.Regex.Match(target, @"/videos/([0-9]+)").Groups[1].Value;
|
||||
play ??= $"https://www.txxx.com/embed/{id}/";
|
||||
}
|
||||
else if (target.Contains("hclips.com", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
site = "hclips";
|
||||
id ??= System.Text.RegularExpressions.Regex.Match(target, @"/videos/([0-9]+)").Groups[1].Value;
|
||||
play ??= $"https://www.hclips.com/embed/{id}/";
|
||||
}
|
||||
else if (target.Contains("hdzog.com", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
site = "hdzog";
|
||||
id ??= System.Text.RegularExpressions.Regex.Match(target, @"/videos/([0-9]+)").Groups[1].Value;
|
||||
play ??= $"https://www.hdzog.com/embed/{id}/";
|
||||
}
|
||||
else if (target.Contains("upornia.com", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
site = "upornia";
|
||||
id ??= System.Text.RegularExpressions.Regex.Match(target, @"/videos/([0-9]+)").Groups[1].Value;
|
||||
play ??= $"https://upornia.com/embed/{id}/";
|
||||
}
|
||||
else if (target.Contains("youjizz.com", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
site = "youjizz";
|
||||
id ??= System.Text.RegularExpressions.Regex.Match(target, @"/videos/([0-9]+)").Groups[1].Value;
|
||||
play ??= $"https://www.youjizz.com/embed/{id}";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user