diff --git a/Program.cs b/Program.cs
index f40c8da..fd20f5d 100644
--- a/Program.cs
+++ b/Program.cs
@@ -52,7 +52,7 @@ namespace dy.net
// 构建应用
var app = builder.Build();
- Log.Debug("DOWN_IMGVIDEO=" + downImgConfig);
+ Log.Debug("ffmpeg=" + downImgConfig);
// 配置中间件
ConfigureMiddleware(app, builder.Environment);
diff --git a/Properties/PublishProfiles/FolderProfile.pubxml.user b/Properties/PublishProfiles/FolderProfile.pubxml.user
index 2d9d237..524b273 100644
--- a/Properties/PublishProfiles/FolderProfile.pubxml.user
+++ b/Properties/PublishProfiles/FolderProfile.pubxml.user
@@ -5,7 +5,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<_PublishTargetUrl>E:\code\dysync\bin\Release\net6.0\publish\
- True|2025-11-24T00:07:00.9951205Z||;True|2025-11-23T23:34:50.0030826+08:00||;True|2025-11-23T23:32:36.7452616+08:00||;True|2025-11-22T23:18:56.3202345+08:00||;True|2025-11-22T22:52:51.7203302+08:00||;True|2025-11-22T22:52:42.9620946+08:00||;True|2025-11-22T22:52:09.8257640+08:00||;True|2025-11-22T22:39:31.5894141+08:00||;True|2025-11-22T22:31:11.0704815+08:00||;True|2025-11-22T22:20:36.4579131+08:00||;True|2025-11-22T22:19:10.2281364+08:00||;True|2025-11-22T19:34:45.9336901+08:00||;True|2025-11-12T23:06:38.7834109+08:00||;False|2025-11-12T23:01:02.2269478+08:00||;True|2025-10-22T22:08:11.6423148+08:00||;True|2025-10-22T21:54:24.7180547+08:00||;True|2025-10-22T21:40:03.5194315+08:00||;True|2025-10-22T21:28:28.8962766+08:00||;True|2025-10-22T21:22:47.9631689+08:00||;True|2025-10-22T21:18:24.5274318+08:00||;True|2025-10-22T21:14:51.6386326+08:00||;False|2025-10-22T21:14:07.6282769+08:00||;True|2025-10-22T21:03:48.9892860+08:00||;True|2025-10-22T21:00:56.3617243+08:00||;False|2025-10-22T21:00:30.5472941+08:00||;True|2025-10-22T20:51:29.6155916+08:00||;False|2025-10-22T20:50:47.1882956+08:00||;True|2025-10-22T15:01:04.1668366+08:00||;True|2025-10-22T14:49:43.6340569+08:00||;True|2025-10-22T14:38:39.4685603+08:00||;True|2025-10-21T18:35:28.8392541+08:00||;True|2025-10-20T10:31:05.5865212+08:00||;True|2025-10-20T10:20:41.5717101+08:00||;True|2025-10-19T10:08:33.6669332+08:00||;False|2025-10-19T10:07:22.3337545+08:00||;False|2025-10-19T10:05:22.9484805+08:00||;True|2025-10-10T16:54:27.1472888+08:00||;False|2025-10-10T16:53:44.1700030+08:00||;False|2025-10-10T16:52:48.1740453+08:00||;False|2025-10-10T16:51:21.5067253+08:00||;False|2025-10-10T16:50:19.2140597+08:00||;False|2025-10-10T16:49:21.2213290+08:00||;False|2025-10-10T16:48:47.7229948+08:00||;False|2025-10-10T16:48:15.1258700+08:00||;True|2025-09-30T13:29:42.2354235+08:00||;True|2025-09-25T11:44:52.6858389+08:00||;True|2025-09-25T11:08:27.8810109+08:00||;True|2025-09-25T09:28:50.2563374+08:00||;True|2025-09-24T16:14:02.3072184+08:00||;True|2025-09-23T22:38:52.4414757+08:00||;True|2025-09-23T22:19:07.1006356+08:00||;True|2025-09-23T22:18:01.5945225+08:00||;True|2025-09-23T22:06:15.6293613+08:00||;True|2025-09-23T21:53:14.2977444+08:00||;True|2025-09-23T21:46:55.2322411+08:00||;False|2025-09-23T21:45:23.7858854+08:00||;False|2025-09-23T21:03:51.8325689+08:00||;True|2025-09-23T10:03:32.2251920+08:00||;False|2025-09-23T09:38:08.2372201+08:00||;False|2025-09-23T09:37:49.9390545+08:00||;True|2024-03-11T21:31:45.8102398+08:00||;True|2024-03-11T07:26:24.7660541+08:00||;True|2024-03-08T22:08:40.0154831+08:00||;True|2024-03-03T10:14:36.8109114+08:00||;True|2024-03-02T18:44:57.3288537+08:00||;True|2024-01-24T17:51:37.9164415+08:00||;True|2024-01-24T16:36:50.5612157+08:00||;True|2024-01-24T15:51:35.7556653+08:00||;True|2024-01-17T23:40:40.7526618+08:00||;True|2024-01-17T23:36:10.3692844+08:00||;True|2024-01-17T23:22:03.2378834+08:00||;True|2024-01-03T11:35:44.7118292+08:00||;True|2024-01-03T11:11:23.4270453+08:00||;True|2024-01-03T11:04:35.2081526+08:00||;True|2024-01-03T10:57:03.7053107+08:00||;True|2024-01-03T10:51:50.7463989+08:00||;False|2024-01-03T10:50:24.9775312+08:00||;True|2024-01-03T10:47:30.1128183+08:00||;True|2024-01-03T10:42:55.8640657+08:00||;True|2024-01-03T09:24:24.3436056+08:00||;True|2024-01-02T23:40:38.2001198+08:00||;True|2024-01-02T23:08:36.7230444+08:00||;True|2024-01-02T22:53:43.9658255+08:00||;True|2024-01-02T22:25:38.5545279+08:00||;False|2024-01-02T22:24:42.6577609+08:00||;True|2024-01-02T22:04:33.4708889+08:00||;True|2024-01-02T21:49:57.9249898+08:00||;True|2023-12-28T22:42:58.5976180+08:00||;True|2023-12-28T22:24:09.2051205+08:00||;True|2023-12-28T22:05:48.4865497+08:00||;True|2023-12-28T21:50:57.4549336+08:00||;True|2023-12-28T21:45:30.4557939+08:00||;True|2023-12-28T21:19:59.3614594+08:00||;False|2023-12-28T21:17:04.3069097+08:00||;False|2023-12-28T21:15:56.7788810+08:00||;False|2023-12-28T21:14:57.3617402+08:00||;False|2023-12-28T21:10:45.4382469+08:00||;True|2023-12-28T19:45:33.1431914+08:00||;True|2023-12-26T11:30:36.6418716+08:00||;True|2023-12-26T11:17:40.6433651+08:00||;
+ True|2025-11-24T00:17:50.3994607Z||;True|2025-11-24T08:07:00.9951205+08:00||;True|2025-11-23T23:34:50.0030826+08:00||;True|2025-11-23T23:32:36.7452616+08:00||;True|2025-11-22T23:18:56.3202345+08:00||;True|2025-11-22T22:52:51.7203302+08:00||;True|2025-11-22T22:52:42.9620946+08:00||;True|2025-11-22T22:52:09.8257640+08:00||;True|2025-11-22T22:39:31.5894141+08:00||;True|2025-11-22T22:31:11.0704815+08:00||;True|2025-11-22T22:20:36.4579131+08:00||;True|2025-11-22T22:19:10.2281364+08:00||;True|2025-11-22T19:34:45.9336901+08:00||;True|2025-11-12T23:06:38.7834109+08:00||;False|2025-11-12T23:01:02.2269478+08:00||;True|2025-10-22T22:08:11.6423148+08:00||;True|2025-10-22T21:54:24.7180547+08:00||;True|2025-10-22T21:40:03.5194315+08:00||;True|2025-10-22T21:28:28.8962766+08:00||;True|2025-10-22T21:22:47.9631689+08:00||;True|2025-10-22T21:18:24.5274318+08:00||;True|2025-10-22T21:14:51.6386326+08:00||;False|2025-10-22T21:14:07.6282769+08:00||;True|2025-10-22T21:03:48.9892860+08:00||;True|2025-10-22T21:00:56.3617243+08:00||;False|2025-10-22T21:00:30.5472941+08:00||;True|2025-10-22T20:51:29.6155916+08:00||;False|2025-10-22T20:50:47.1882956+08:00||;True|2025-10-22T15:01:04.1668366+08:00||;True|2025-10-22T14:49:43.6340569+08:00||;True|2025-10-22T14:38:39.4685603+08:00||;True|2025-10-21T18:35:28.8392541+08:00||;True|2025-10-20T10:31:05.5865212+08:00||;True|2025-10-20T10:20:41.5717101+08:00||;True|2025-10-19T10:08:33.6669332+08:00||;False|2025-10-19T10:07:22.3337545+08:00||;False|2025-10-19T10:05:22.9484805+08:00||;True|2025-10-10T16:54:27.1472888+08:00||;False|2025-10-10T16:53:44.1700030+08:00||;False|2025-10-10T16:52:48.1740453+08:00||;False|2025-10-10T16:51:21.5067253+08:00||;False|2025-10-10T16:50:19.2140597+08:00||;False|2025-10-10T16:49:21.2213290+08:00||;False|2025-10-10T16:48:47.7229948+08:00||;False|2025-10-10T16:48:15.1258700+08:00||;True|2025-09-30T13:29:42.2354235+08:00||;True|2025-09-25T11:44:52.6858389+08:00||;True|2025-09-25T11:08:27.8810109+08:00||;True|2025-09-25T09:28:50.2563374+08:00||;True|2025-09-24T16:14:02.3072184+08:00||;True|2025-09-23T22:38:52.4414757+08:00||;True|2025-09-23T22:19:07.1006356+08:00||;True|2025-09-23T22:18:01.5945225+08:00||;True|2025-09-23T22:06:15.6293613+08:00||;True|2025-09-23T21:53:14.2977444+08:00||;True|2025-09-23T21:46:55.2322411+08:00||;False|2025-09-23T21:45:23.7858854+08:00||;False|2025-09-23T21:03:51.8325689+08:00||;True|2025-09-23T10:03:32.2251920+08:00||;False|2025-09-23T09:38:08.2372201+08:00||;False|2025-09-23T09:37:49.9390545+08:00||;True|2024-03-11T21:31:45.8102398+08:00||;True|2024-03-11T07:26:24.7660541+08:00||;True|2024-03-08T22:08:40.0154831+08:00||;True|2024-03-03T10:14:36.8109114+08:00||;True|2024-03-02T18:44:57.3288537+08:00||;True|2024-01-24T17:51:37.9164415+08:00||;True|2024-01-24T16:36:50.5612157+08:00||;True|2024-01-24T15:51:35.7556653+08:00||;True|2024-01-17T23:40:40.7526618+08:00||;True|2024-01-17T23:36:10.3692844+08:00||;True|2024-01-17T23:22:03.2378834+08:00||;True|2024-01-03T11:35:44.7118292+08:00||;True|2024-01-03T11:11:23.4270453+08:00||;True|2024-01-03T11:04:35.2081526+08:00||;True|2024-01-03T10:57:03.7053107+08:00||;True|2024-01-03T10:51:50.7463989+08:00||;False|2024-01-03T10:50:24.9775312+08:00||;True|2024-01-03T10:47:30.1128183+08:00||;True|2024-01-03T10:42:55.8640657+08:00||;True|2024-01-03T09:24:24.3436056+08:00||;True|2024-01-02T23:40:38.2001198+08:00||;True|2024-01-02T23:08:36.7230444+08:00||;True|2024-01-02T22:53:43.9658255+08:00||;True|2024-01-02T22:25:38.5545279+08:00||;False|2024-01-02T22:24:42.6577609+08:00||;True|2024-01-02T22:04:33.4708889+08:00||;True|2024-01-02T21:49:57.9249898+08:00||;True|2023-12-28T22:42:58.5976180+08:00||;True|2023-12-28T22:24:09.2051205+08:00||;True|2023-12-28T22:05:48.4865497+08:00||;True|2023-12-28T21:50:57.4549336+08:00||;True|2023-12-28T21:45:30.4557939+08:00||;True|2023-12-28T21:19:59.3614594+08:00||;False|2023-12-28T21:17:04.3069097+08:00||;False|2023-12-28T21:15:56.7788810+08:00||;False|2023-12-28T21:14:57.3617402+08:00||;False|2023-12-28T21:10:45.4382469+08:00||;True|2023-12-28T19:45:33.1431914+08:00||;True|2023-12-26T11:30:36.6418716+08:00||;
\ No newline at end of file
diff --git a/app/src/pages/set/AppSet.vue b/app/src/pages/set/AppSet.vue
index 6d2929c..ae3ec7e 100644
--- a/app/src/pages/set/AppSet.vue
+++ b/app/src/pages/set/AppSet.vue
@@ -45,6 +45,13 @@
+
+
+
+
+
+
+
@@ -85,6 +92,8 @@ interface FormState {
UperSaveTogether: boolean;
UperUseViedoTitle: boolean;
LogKeepDay: number;
+ DownImage: boolean;
+ DownMp3: boolean;
}
// 琛ㄥ崟鍒濆鏁版嵁
@@ -97,6 +106,8 @@ const formState: UnwrapRef = reactive({
UperSaveTogether: false,
DownImageVideo: false,
DownImageVideoFromEnv: false,
+ DownMp3: false,
+ DownImage: false,
});
// 琛ㄥ崟鏍¢獙瑙勫垯
@@ -144,6 +155,8 @@ const getConfig = () => {
UperUseViedoTitle: res.data.uperUseViedoTitle,
UperSaveTogether: res.data.uperSaveTogether,
LogKeepDay: res.data.logKeepDay,
+ DownImage: res.data.downImage,
+ DownMp3: res.data.downMp3,
});
// 鐩戝惉鐜鍙橀噺閰嶇疆锛屾帶鍒舵槸鍚︽樉绀哄浘鐗囪棰戜笅杞介夐」
diff --git a/expand/dy.image/FFmpegHelper.cs b/expand/dy.image/FFmpegHelper.cs
index 02f2798..4f4abb7 100644
--- a/expand/dy.image/FFmpegHelper.cs
+++ b/expand/dy.image/FFmpegHelper.cs
@@ -70,6 +70,81 @@ namespace dy.image
Directory.CreateDirectory(outputDirectory);
}
+ //// 鍏抽敭姝ラ 1: 鍒涘缓涓存椂鐩綍骞剁敓鎴愭湁搴忓浘鐗囧簭鍒
+ //string tempImageDir = Path.Combine(AppContext.BaseDirectory, "temp", Guid.NewGuid().ToString());
+ //Directory.CreateDirectory(tempImageDir);
+
+ //var imageList = imageFilePaths.ToList();
+ //try
+ //{
+ // for (int i = 0; i < imageList.Count; i++)
+ // {
+ // string sourcePath = imageList[i];
+ // // 閲嶅懡鍚嶄负鏈夎寰嬬殑鏂囦欢鍚嶏紝濡 temp_001.jpg, temp_002.png
+ // string extension = Path.GetExtension(sourcePath);
+ // string destFileName = $"temp_{i + 1:D3}{extension}"; // D3 纭繚鏄3浣嶆暟瀛楋紝涓嶈冻琛0
+ // string destPath = Path.Combine(tempImageDir, destFileName);
+ // File.Copy(sourcePath, destPath);
+ // }
+
+ // // 鍏抽敭姝ラ 2: 鏋勫缓绗﹀悎浣犳垚鍔熺粡楠岀殑 FFmpeg 鍛戒护
+ // string imageSequencePattern = Path.Combine(tempImageDir, "temp_%03d" + Path.GetExtension(imageList[0]));
+ // double imageFps = Math.Round(1.0 / ImageDisplayDurationSeconds, 2); ; // 渚嬪 1/3 = 0.333... fps
+
+ // // 闊抽婊ら暅锛氬鏋滈煶棰戞瘮鍥剧墖闀垮垯鎴柇锛屾瘮鍥剧墖鐭垯寰幆
+ // string audioFilter = await GetAudioFilterAsync(audioFilePath, imageList.Count * ImageDisplayDurationSeconds);
+
+
+ // // 鏋勫缓 FFmpeg 鍙傛暟鍒楄〃
+ // var arguments = new List
+ // {
+ // "-y", // 瑕嗙洊杈撳嚭鏂囦欢
+ // // --- 杈撳叆鍥剧墖搴忓垪鐨勯厤缃 ---
+ // "-f", "image2", // 鏄庣‘鎸囧畾杈撳叆涓哄浘鐗囧簭鍒
+ // "-vcodec", "webp", // 寮哄埗浣跨敤 WebP 瑙g爜鍣
+ // "-r", imageFps.ToString(CultureInfo.InvariantCulture), // 璁剧疆鍥剧墖鎾斁閫熷害
+ // $"-i", $"\"{imageSequencePattern}\"", // 鍥剧墖搴忓垪鐨勮矾寰勬ā寮
+ // // --- 杈撳叆闊抽鐨勯厤缃 ---
+ // audioFilter, // 搴旂敤闊抽婊ら暅锛堝彲鑳戒负绌猴級
+ // $"-i", $"\"{audioFilePath}\"", // 闊抽鏂囦欢璺緞
+ // // --- 瑙嗛缂栫爜閰嶇疆 ---
+ // "-c:v", VideoCodec, // 瑙嗛缂栫爜鍣 (濡 libx264)
+ // "-preset", VideoPreset, // 缂栫爜棰勮 (濡 medium)
+ // $"-crf", $"{VideoCrf}", // 瑙嗛璐ㄩ噺鍥犲瓙
+ // $"-s", $"{VideoWidth}x{VideoHeight}", // 杈撳嚭瑙嗛鍒嗚鲸鐜
+ // "-pix_fmt", "yuv420p", // 鍍忕礌鏍煎紡锛岀‘淇濆吋瀹规
+ // // --- 闊抽缂栫爜閰嶇疆 ---
+ // "-c:a", AudioCodec, // 闊抽缂栫爜鍣 (濡 aac)
+ // $"-b:a", $"{AudioBitrate}", // 闊抽姣旂壒鐜 (濡 192k)
+ // // --- 杈撳嚭鏂囦欢 ---
+ // $"\"{outputVideoPath}\"" // 鏈缁堣緭鍑鸿棰戣矾寰
+ // };
+
+ // string args = string.Join(" ", arguments);
+ // Console.WriteLine($"鎵цFFmpeg鍛戒护: {_ffmpegExecutablePath} {args}");
+
+ // // 鎵ц鍛戒护
+ // await ExecuteFFmpegAsync(args, progress, cancellationToken);
+
+ // if (File.Exists(outputVideoPath))
+ // {
+ // return outputVideoPath;
+ // }
+ // else
+ // {
+ // throw new InvalidOperationException("瑙嗛鍚堟垚澶辫触锛屾湭鐢熸垚杈撳嚭鏂囦欢銆");
+ // }
+ //}
+ //finally
+ //{
+ // // 鍏抽敭姝ラ 3: 娓呯悊涓存椂鏂囦欢
+ // if (Directory.Exists(tempImageDir))
+ // {
+ // Directory.Delete(tempImageDir, recursive: true);
+ // }
+ //}
+
+
// 鍏抽敭姝ラ 1: 鍒涘缓涓存椂鐩綍骞剁敓鎴愭湁搴忓浘鐗囧簭鍒
string tempImageDir = Path.Combine(AppContext.BaseDirectory, "temp", Guid.NewGuid().ToString());
Directory.CreateDirectory(tempImageDir);
@@ -80,51 +155,108 @@ namespace dy.image
for (int i = 0; i < imageList.Count; i++)
{
string sourcePath = imageList[i];
- // 閲嶅懡鍚嶄负鏈夎寰嬬殑鏂囦欢鍚嶏紝濡 temp_001.jpg, temp_002.png
string extension = Path.GetExtension(sourcePath);
- string destFileName = $"temp_{i + 1:D3}{extension}"; // D3 纭繚鏄3浣嶆暟瀛楋紝涓嶈冻琛0
+ string destFileName = $"temp_{i + 1:D3}{extension}";
string destPath = Path.Combine(tempImageDir, destFileName);
File.Copy(sourcePath, destPath);
}
- // 鍏抽敭姝ラ 2: 鏋勫缓绗﹀悎浣犳垚鍔熺粡楠岀殑 FFmpeg 鍛戒护
string imageSequencePattern = Path.Combine(tempImageDir, "temp_%03d" + Path.GetExtension(imageList[0]));
- double imageFps = Math.Round(1.0 / ImageDisplayDurationSeconds, 2); ; // 渚嬪 1/3 = 0.333... fps
+ double imageFps = Math.Round(1.0 / ImageDisplayDurationSeconds, 2);
- // 闊抽婊ら暅锛氬鏋滈煶棰戞瘮鍥剧墖闀垮垯鎴柇锛屾瘮鍥剧墖鐭垯寰幆
- string audioFilter = await GetAudioFilterAsync(audioFilePath, imageList.Count * ImageDisplayDurationSeconds);
-
- // 鏋勫缓 FFmpeg 鍙傛暟鍒楄〃
- var arguments = new List
+ // --- 淇鐐 1: 鏁村悎闊抽鏃堕暱鑾峰彇閫昏緫 ---
+ // 鎴戜滑涓嶅啀闇瑕 GetAudioFilterAsync锛岃屾槸鐩存帴鑾峰彇鏃堕暱鐢ㄤ簬璁$畻瑙嗛寰幆
+ double audioDurationSeconds = imageList.Count * ImageDisplayDurationSeconds; // 榛樿鍊间负鍥剧墖鎬绘椂闀
+ try
{
- "-y", // 瑕嗙洊杈撳嚭鏂囦欢
- // --- 杈撳叆鍥剧墖搴忓垪鐨勯厤缃 ---
- "-f", "image2", // 鏄庣‘鎸囧畾杈撳叆涓哄浘鐗囧簭鍒
- "-vcodec", "webp", // 寮哄埗浣跨敤 WebP 瑙g爜鍣
- "-r", imageFps.ToString(CultureInfo.InvariantCulture), // 璁剧疆鍥剧墖鎾斁閫熷害
- $"-i", $"\"{imageSequencePattern}\"", // 鍥剧墖搴忓垪鐨勮矾寰勬ā寮
- // --- 杈撳叆闊抽鐨勯厤缃 ---
- audioFilter, // 搴旂敤闊抽婊ら暅锛堝彲鑳戒负绌猴級
- $"-i", $"\"{audioFilePath}\"", // 闊抽鏂囦欢璺緞
- // --- 瑙嗛缂栫爜閰嶇疆 ---
- "-c:v", VideoCodec, // 瑙嗛缂栫爜鍣 (濡 libx264)
- "-preset", VideoPreset, // 缂栫爜棰勮 (濡 medium)
- $"-crf", $"{VideoCrf}", // 瑙嗛璐ㄩ噺鍥犲瓙
- $"-s", $"{VideoWidth}x{VideoHeight}", // 杈撳嚭瑙嗛鍒嗚鲸鐜
- "-pix_fmt", "yuv420p", // 鍍忕礌鏍煎紡锛岀‘淇濆吋瀹规
- // --- 闊抽缂栫爜閰嶇疆 ---
- "-c:a", AudioCodec, // 闊抽缂栫爜鍣 (濡 aac)
- $"-b:a", $"{AudioBitrate}", // 闊抽姣旂壒鐜 (濡 192k)
- // --- 杈撳嚭鏂囦欢 ---
- $"\"{outputVideoPath}\"" // 鏈缁堣緭鍑鸿棰戣矾寰
- };
+ // 浣跨敤 ffprobe 鑾峰彇闊抽鏃堕暱
+ var startInfo = new ProcessStartInfo
+ {
+ FileName = _ffprobeExecutablePath,
+ Arguments = $"-v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 \"{audioFilePath}\"",
+ RedirectStandardOutput = true,
+ RedirectStandardError = true,
+ UseShellExecute = false,
+ CreateNoWindow = true
+ };
+
+ using (var process = new Process { StartInfo = startInfo })
+ {
+ process.Start();
+ string output = await process.StandardOutput.ReadToEndAsync();
+ await process.WaitForExitAsync();
+
+ if (double.TryParse(output, out double duration))
+ {
+ audioDurationSeconds = duration;
+ Console.WriteLine($"鎴愬姛鑾峰彇闊抽鏃堕暱: {audioDurationSeconds:F2}s");
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ Console.WriteLine($"鑾峰彇闊抽鏃堕暱澶辫触锛屽皢浣跨敤鍥剧墖鎬绘椂闀 ({audioDurationSeconds:F2}s) 浣滀负瑙嗛鏃堕暱: {ex.Message}");
+ }
+
+ // 璁$畻鍥剧墖搴忓垪闇瑕佸惊鐜殑娆℃暟
+ int loopCount = 1;
+ double singleLoopDuration = imageList.Count * ImageDisplayDurationSeconds;
+ if (audioDurationSeconds > singleLoopDuration)
+ {
+ loopCount = (int)Math.Ceiling(audioDurationSeconds / singleLoopDuration);
+ Console.WriteLine($"鍥剧墖搴忓垪灏嗗惊鐜 {loopCount} 娆′互鍖归厤闊抽鏃堕暱");
+ }
+
+ // --- 淇鐐 2: 閲嶆柊鏋勫缓 FFmpeg 鍙傛暟鍒楄〃 ---
+ var arguments = new List
+ {
+ "-y", // 瑕嗙洊杈撳嚭鏂囦欢
+
+ // --- 鎵鏈夎緭鍏ユ枃浠舵斁鍦ㄦ渶鍓嶉潰 ---
+ // 鍥剧墖搴忓垪杈撳叆
+ "-f", "image2",
+ "-r", imageFps.ToString(CultureInfo.InvariantCulture),
+ "-i", $"\"{imageSequencePattern}\"",
+
+ // 闊抽杈撳叆
+ "-i", $"\"{audioFilePath}\"",
+
+ // --- 淇鐐 3: 浣跨敤 filter_complex 瀵硅棰戞祦杩涜寰幆 ---
+ // [0:v] 琛ㄧず绗竴涓緭鍏ワ紙鍥剧墖搴忓垪锛夌殑瑙嗛娴
+ // loop={loopCount-1} 琛ㄧず寰幆 (娆℃暟-1) 娆
+ // [v] 鏄鐞嗗悗鐨勮棰戞祦鐨勫埆鍚
+ "-filter_complex", $"\"[0:v]loop={loopCount - 1}[v]\"",
+
+ // --- 淇鐐 4: 鏄庣‘鏄犲皠杈撳嚭娴 ---
+ // 灏嗗鐞嗗悗鐨勮棰戞祦 [v] 鏄犲皠鍒拌緭鍑
+ "-map", "\"[v]\"",
+ // 灏嗙浜屼釜杈撳叆锛堥煶棰戞枃浠讹級鐨勯煶棰戞祦鏄犲皠鍒拌緭鍑
+ "-map", "\"1:a\"",
+
+ // --- 瑙嗛缂栫爜閰嶇疆 ---
+ "-c:v", VideoCodec,
+ "-preset", VideoPreset,
+ "-crf", $"{VideoCrf}",
+ "-s", $"{VideoWidth}x{VideoHeight}",
+ "-pix_fmt", "yuv420p",
+
+ // --- 闊抽缂栫爜閰嶇疆 ---
+ "-c:a", AudioCodec,
+ "-b:a", $"{AudioBitrate}",
+
+ // --- 淇鐐 5: 浣跨敤 -shortest 鍙傛暟 ---
+ // 纭繚瑙嗛鍜岄煶棰戝悓鏃剁粨鏉燂紝鍗充娇寰幆娆℃暟璁$畻寰椾笉瀹屽叏绮剧‘
+ "-shortest",
+
+ // --- 杈撳嚭鏂囦欢 ---
+ $"\"{outputVideoPath}\""
+ };
string args = string.Join(" ", arguments);
Console.WriteLine($"鎵цFFmpeg鍛戒护: {_ffmpegExecutablePath} {args}");
// 鎵ц鍛戒护
await ExecuteFFmpegAsync(args, progress, cancellationToken);
-
if (File.Exists(outputVideoPath))
{
return outputVideoPath;
@@ -133,10 +265,11 @@ namespace dy.image
{
throw new InvalidOperationException("瑙嗛鍚堟垚澶辫触锛屾湭鐢熸垚杈撳嚭鏂囦欢銆");
}
+
}
finally
{
- // 鍏抽敭姝ラ 3: 娓呯悊涓存椂鏂囦欢
+ // 娓呯悊涓存椂鐩綍
if (Directory.Exists(tempImageDir))
{
Directory.Delete(tempImageDir, recursive: true);
diff --git a/expand/dy.image/ImageMergeToVideoService.cs b/expand/dy.image/ImageMergeToVideoService.cs
index c39c0c2..1ce7055 100644
--- a/expand/dy.image/ImageMergeToVideoService.cs
+++ b/expand/dy.image/ImageMergeToVideoService.cs
@@ -13,7 +13,18 @@
_downloadHelper = downloadHelper;
_fFmpegHelper = fFmpegHelper;
}
- public async Task MergeToVideo(string rootPath, MediaMergeRequest request,string outputVideoPath,string fileNamefolder)
+ ///
+ /// 瑙嗛鍚堟垚
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public async Task MergeToVideo(string rootPath, MediaMergeRequest request,string outputVideoPath,string fileNamefolder,bool mergeImg2Viedo,bool downImage=false,bool downMp3=false)
{
try
@@ -31,17 +42,19 @@
}
else
{
- for (int i = 0; i < rawImages.Count(); i++)
+ if(downImage)
{
- string sourcePath = rawImages[i];
- // 閲嶅懡鍚嶄负鏈夎寰嬬殑鏂囦欢鍚嶏紝濡 temp_001.jpg, temp_002.png
- string extension = Path.GetExtension(sourcePath);
- string destFileName = $"temp_{i + 1:D3}{extension}"; // D3 纭繚鏄3浣嶆暟瀛楋紝涓嶈冻琛0
- string destPath = Path.Combine(fileNamefolder, destFileName);
- File.Copy(sourcePath, destPath);
+ for (int i = 0; i < rawImages.Count(); i++)
+ {
+ string sourcePath = rawImages[i];
+ // 閲嶅懡鍚嶄负鏈夎寰嬬殑鏂囦欢鍚嶏紝濡 temp_001.jpg, temp_002.png
+ string extension = Path.GetExtension(sourcePath);
+ string destFileName = $"temp_{i + 1:D3}{extension}"; // D3 纭繚鏄3浣嶆暟瀛楋紝涓嶈冻琛0
+ string destPath = Path.Combine(fileNamefolder, destFileName);
+ File.Copy(sourcePath, destPath);
+ }
}
}
-
// 2. 涓嬭浇闊抽
var (rawAudios, audioError) = await DownloadMediaAsync(request.AudioUrls, Path.Combine(tempDir, "raw-audios"), "audio_", "mp3");
if (!string.IsNullOrEmpty(audioError))
@@ -51,17 +64,25 @@
}
else
{
- for (int i = 0; i < rawAudios.Count(); i++)
+ if(downMp3)
{
- string sourcePath = rawAudios[i];
- // 閲嶅懡鍚嶄负鏈夎寰嬬殑鏂囦欢鍚嶏紝濡 temp_001.mp3, temp_002.mp3
- string extension = Path.GetExtension(sourcePath);
- string destFileName = $"temp_{i + 1:D3}{extension}"; // D3 纭繚鏄3浣嶆暟瀛楋紝涓嶈冻琛0
- string destPath = Path.Combine(fileNamefolder, destFileName);
- File.Copy(sourcePath, destPath);
+ for (int i = 0; i < rawAudios.Count(); i++)
+ {
+ string sourcePath = rawAudios[i];
+ // 閲嶅懡鍚嶄负鏈夎寰嬬殑鏂囦欢鍚嶏紝濡 temp_001.mp3, temp_002.mp3
+ string extension = Path.GetExtension(sourcePath);
+ string destFileName = $"temp_{i + 1:D3}{extension}"; // D3 纭繚鏄3浣嶆暟瀛楋紝涓嶈冻琛0
+ string destPath = Path.Combine(fileNamefolder, destFileName);
+ File.Copy(sourcePath, destPath);
+ }
}
}
-
+ if (!mergeImg2Viedo)
+ {
+ // 涓嶅悎鎴愯棰戯紝鐩存帴杩斿洖鎴愬姛
+ Serilog.Log.Debug($"涓嶅悎鎴愯棰戯紝鐩存帴杩斿洖");
+ return true;
+ }
// 4. 鍚堟垚瑙嗛
//var outputVideoPath = Path.Combine(tempDir, "output", $"merged-video.{request.OutputFormat.ToLower()}");
@@ -72,7 +93,7 @@
// 鏍规嵁鍥剧墖鏁伴噺璋冩暣姣忓紶鍥剧墖鏄剧ず鏃堕暱
if (request.ImageUrls.Count <= 3)
{
- request.ImageDurationPerSecond = 5;
+ request.ImageDurationPerSecond = 3;
}
if (request.ImageUrls.Count > 20)
{
diff --git a/extension/ServiceExtension.cs b/extension/ServiceExtension.cs
index 79aaa6a..403d7e5 100644
--- a/extension/ServiceExtension.cs
+++ b/extension/ServiceExtension.cs
@@ -188,7 +188,7 @@ namespace dy.net.extension
services.AddHttpClient("dy_uper", client =>
{
- //client.DefaultRequestHeaders.Referrer = new Uri("https://www.douyin.com/user/self?showTab=like");
+ client.DefaultRequestHeaders.Referrer = new Uri("https://www.douyin.com/user/MS4wLjABAAAA1zFIBhWG-3qS8MiggDMhyCpqDnvfGYf_mtsdgtBzV7A?from_tab_name=main&showTab=post&vid=7576282367263807451");
});
// 閰嶇疆HttpClient锛圫tartup.cs鎴朠rogram.cs锛
services.AddHttpClient("dy_download")
diff --git a/job/DouyinBaseSyncJob.cs b/job/DouyinBaseSyncJob.cs
index 9bfacac..2e93fb8 100644
--- a/job/DouyinBaseSyncJob.cs
+++ b/job/DouyinBaseSyncJob.cs
@@ -4,6 +4,7 @@ using dy.net.dto;
using dy.net.model;
using dy.net.service;
using dy.net.utils;
+using Newtonsoft.Json;
using Quartz;
using Quartz.Util;
using Serilog;
@@ -133,6 +134,10 @@ namespace dy.net.job
return;
}
+ //灏嗛厤缃」鎵撳嵃鏃ュ織
+ Log.Debug($"鏈鏂帮細{JsonConvert.SerializeObject(config)}");
+
+
// 2. 浠庨厤缃腑鑾峰彇姣忛〉璇锋眰鏁伴噺
if (config.BatchCount > 0)
count = config.BatchCount.ToString();
@@ -356,9 +361,12 @@ namespace dy.net.job
// 濡傛灉閰嶇疆浜嗕笅杞藉浘鐗囪棰戯紝鍒欏鐞嗗浘鐗囬泦骞跺悎鎴愯棰
if (_downImageVideo)
{
- var mergevideo = await ProcessImageSetAndMergeToVideo(cookie, item, data, config);
- if (mergevideo != null)
- videos.Add(mergevideo);
+ if(config.DownImage||config.DownMp3||config.DownImage)
+ {
+ var mergevideo = await ProcessImageSetAndMergeToVideo(cookie, item, data, config);
+ if (mergevideo != null)
+ videos.Add(mergevideo);
+ }
}
}
return videos;
@@ -404,9 +412,13 @@ namespace dy.net.job
// 涓嬭浇瑙嗛
if (!await _douyinService.DownloadAsync(videoUrl, savePath, cookie.Cookies))
{
- Log.Error($"{JobType}-瑙嗛[{TikTokFileNameHelper.SanitizePath(item.Desc)}]涓嬭浇澶辫触");
+ Log.Error($"{JobType}-{item?.Author?.Nickname??""}-瑙嗛[{TikTokFileNameHelper.SanitizePath(item.Desc)}]涓嬭浇澶辫触");
return null;
}
+ else
+ {
+ Log.Debug($"{JobType}-{item?.Author?.Nickname ?? ""}-瑙嗛[{TikTokFileNameHelper.SanitizePath(item.Desc)}]涓嬭浇瀹屾垚");
+ }
// 涓嬭浇瑙嗛灏侀潰
await DownVideoCover(item, saveFolder, cookie, config);
@@ -455,7 +467,7 @@ namespace dy.net.job
var imageService = _serviceProvider.GetService();
if (imageService == null)
{
- Log.Error($"{JobType} -鍥剧墖瑙嗛鍚屾-鏃犳硶鍒涘缓 ImageMergeToVideoService銆");
+ Log.Error($"{JobType} -鍥剧墖瑙嗛鍚屾-鏃犳硶瀹炰緥鍖 ImageMergeToVideoService銆");
return null;
}
@@ -484,29 +496,35 @@ namespace dy.net.job
};
// 鎵ц鍥剧墖鍚堟垚瑙嗛鎿嶄綔
- var mergeResult = await imageService.MergeToVideo(AppContext.BaseDirectory, reqParams, savePath, fileNamefolder);
+ var mergeResult = await imageService.MergeToVideo(AppContext.BaseDirectory, reqParams, savePath, fileNamefolder,config.DownImageVideo,config.DownImage,config.DownMp3);
if (!mergeResult)
{
Log.Error($"{JobType}-鍥剧墖瑙嗛鍚屾-瑙嗛[{TikTokFileNameHelper.SanitizePath(item.Desc)}]鍚堟垚澶辫触");
return null;
}
- // 妫鏌ュ悎鎴愬悗鐨勮棰戞枃浠舵槸鍚︽湁鏁
- if (!File.Exists(savePath) || new FileInfo(savePath).Length <= 0)
+ if (config.DownImageVideo)
{
- Log.Error($"{JobType}-鍥剧墖瑙嗛鍚屾-瑙嗛[{TikTokFileNameHelper.SanitizePath(item.Desc)}]鍚堟垚澶辫触");
- // 娓呯悊鏃犳晥鐨勬枃浠跺拰鏂囦欢澶
- if (Directory.Exists(fileNamefolder))
+ // 妫鏌ュ悎鎴愬悗鐨勮棰戞枃浠舵槸鍚︽湁鏁
+ if (!File.Exists(savePath) || new FileInfo(savePath).Length <= 0)
{
- File.Delete(savePath);
- Directory.Delete(fileNamefolder, true);
- Log.Error($"{JobType}-鍥剧墖瑙嗛鍚屾-宸插垹闄ゅ悎鎴愬け璐ョ殑瑙嗛鏂囦欢鍜岀洰褰");
+ Log.Error($"{JobType}-鍥剧墖瑙嗛鍚屾-瑙嗛[{TikTokFileNameHelper.SanitizePath(item.Desc)}]鍚堟垚澶辫触");
+ // 娓呯悊鏃犳晥鐨勬枃浠跺拰鏂囦欢澶
+ if (Directory.Exists(fileNamefolder))
+ {
+ File.Delete(savePath);
+ Directory.Delete(fileNamefolder, true);
+ Log.Error($"{JobType}-鍥剧墖瑙嗛鍚屾-宸插垹闄ゅ悎鎴愬け璐ョ殑瑙嗛鏂囦欢鍜岀洰褰");
+ }
+ return null;
}
- return null;
+ }
+ else
+ {
}
- // 涓嬭浇瑙嗛灏侀潰锛堜娇鐢ㄧ涓寮犲浘鐗囦綔涓哄皝闈級
- await DownVideoCover(imageUrls.FirstOrDefault(), fileNamefolder, cookie, item, config);
+ // 涓嬭浇瑙嗛灏侀潰锛堜娇鐢ㄧ涓寮犲浘鐗囦綔涓哄皝闈級
+ await DownVideoCover(imageUrls.FirstOrDefault(), fileNamefolder, cookie, item, config);
// 涓嬭浇浣滆呭ご鍍
var (avatarSavePath, avatarUrl) = await DownAuthorAvatar(cookie, item);
// 鐢熸垚NFO鏂囦欢
@@ -690,7 +708,7 @@ namespace dy.net.job
if (!string.IsNullOrWhiteSpace(downImageVideoConfig))
{
downImageVideoConfig = downImageVideoConfig.ToLower();
- _downImageVideo = config.DownImageVideo && (downImageVideoConfig == "1" || downImageVideoConfig == "y" || downImageVideoConfig == "t" || downImageVideoConfig == "true");
+ _downImageVideo = config.DownImageVideo && downImageVideoConfig == "1";
}
}
diff --git a/model/AppConfig.cs b/model/AppConfig.cs
index 425d017..77d8c17 100644
--- a/model/AppConfig.cs
+++ b/model/AppConfig.cs
@@ -33,6 +33,15 @@ namespace dy.net.model
/// 鏄惁涓嬭浇鍥剧墖瑙嗛
///
public bool DownImageVideo { get; set; }
+ ///
+ /// 鍥炬枃瑙嗛 鏄惁棰濆涓嬭浇鍥剧墖
+ ///
+ public bool DownImage { get; set; }
+ ///
+ /// 鍥炬枃瑙嗛 鏄惁棰濆涓嬭浇mp3
+ ///
+ public bool DownMp3 { get; set; }
+
///
/// 鏃ュ織淇濈暀澶╂暟,闃叉瀹瑰櫒鏃ュ織澶锛岄粯璁10澶
///
@@ -40,6 +49,7 @@ namespace dy.net.model
[SugarColumn(IsIgnore=true)]
public bool DownImageVideoFromEnv { get; set; }
+
}
}
diff --git a/service/DouyinCommonService.cs b/service/DouyinCommonService.cs
index 2602008..6868c6f 100644
--- a/service/DouyinCommonService.cs
+++ b/service/DouyinCommonService.cs
@@ -50,8 +50,12 @@ namespace dy.net.service
Id = IdGener.GetLong().ToString(),
Cron = "30",
BatchCount = 10,
+ LogKeepDay = 10,
+ UperSaveTogether = false,//鍗氫富瑙嗛锛歵rue-->姣忎釜瑙嗛鍗曠嫭涓涓枃浠跺す false-->鎵鏈夎棰戞斁鍦ㄥ悓涓涓枃浠跺す
+ UperUseViedoTitle = false,//鍗氫富瑙嗛锛歵rue-->浣跨敤瑙嗛鏍囬浣滀负鏂囦欢鍚 false-->浣跨敤瑙嗛id浣滀负鏂囦欢鍚
DownImageVideo = downLoadImage,
- LogKeepDay = 10
+ DownMp3 = false,
+ DownImage = false
};
sqlSugarClient.Insertable(config).ExecuteCommand();
return config;
@@ -77,6 +81,8 @@ namespace dy.net.service
cc.UperSaveTogether = config.UperSaveTogether;
cc.UperUseViedoTitle = config.UperUseViedoTitle;
cc.LogKeepDay = config.LogKeepDay;
+ cc.DownMp3= config.DownMp3;
+ cc.DownImage= config.DownImage;
}
var update = await sqlSugarClient.Updateable(cc).ExecuteCommandAsync();
diff --git a/service/DouyinHttpClientService.cs b/service/DouyinHttpClientService.cs
index d6daee2..778a299 100644
--- a/service/DouyinHttpClientService.cs
+++ b/service/DouyinHttpClientService.cs
@@ -184,7 +184,7 @@ namespace dy.net.service
}
httpClient.DefaultRequestHeaders.Add("Cookie", cookie);
- var parameters = DouyinBaseParamDics.UpderPostParams;
+ var parameters = DouyinBaseParamDics.InitializeDouyinPostParams();//淇鍏虫敞鐨勪笉涓嬭浇鍥炬枃瑙嗛
{
// 娣诲姞鍔ㄦ佸弬鏁
parameters["max_cursor"] = cursor;
@@ -195,7 +195,6 @@ namespace dy.net.service
// 鏋勫缓璇锋眰URL
var queryString = new FormUrlEncodedContent(parameters);
string fullUrl = $"{DouYinApi}/post?{await queryString.ReadAsStringAsync()}";
-
var ablog = new ABogus();//璁$畻X-Bogus
var a_bogus = ablog.GetValue(parameters);
diff --git a/service/DouyinQuartzJobService.cs b/service/DouyinQuartzJobService.cs
index cd8431b..390caea 100644
--- a/service/DouyinQuartzJobService.cs
+++ b/service/DouyinQuartzJobService.cs
@@ -20,23 +20,23 @@ namespace dy.net.service
///
public async Task StartJob(string expression,int delay=5000)
{
- await StartCollectJob(expression);
+ //await StartCollectJob(expression);
- await Task.Delay(delay);
- //濡傛灉鏄暟瀛楀垯鍔1鍒嗛挓锛屽噺灏戝苟鍙
- if (int.TryParse(expression, out int cron))
- {
- cron++;
- expression = cron.ToString();
- }
- await StartFavoriteJob(expression);
+ //await Task.Delay(delay);
+ ////濡傛灉鏄暟瀛楀垯鍔1鍒嗛挓锛屽噺灏戝苟鍙
+ //if (int.TryParse(expression, out int cron))
+ //{
+ // cron++;
+ // expression = cron.ToString();
+ //}
+ //await StartFavoriteJob(expression);
- await Task.Delay(delay);
- if (int.TryParse(expression, out int cron2))
- {
- cron2++;
- expression = cron2.ToString();
- }
+ //await Task.Delay(delay);
+ //if (int.TryParse(expression, out int cron2))
+ //{
+ // cron2++;
+ // expression = cron2.ToString();
+ //}
await StartUperPostJob(expression);
}
diff --git a/utils/DouyinBaseParamDics.cs b/utils/DouyinBaseParamDics.cs
index c0cf2d0..c60834f 100644
--- a/utils/DouyinBaseParamDics.cs
+++ b/utils/DouyinBaseParamDics.cs
@@ -1,4 +1,6 @@
-锘縩amespace dy.net.utils
+锘縰sing System.Threading.Channels;
+
+namespace dy.net.utils
{
public class DouyinBaseParamDics
{
@@ -67,14 +69,14 @@
{ "browser_online", "true" },
{ "browser_platform", "Win32" },
{ "browser_version", "5.0%20%28Windows%29" },
- { "channel", "tiktok_web" },
{ "cookie_enabled", "true" },
{ "count", "18" },
{ "coverFormat", "2" },
{ "cursor", "0" },
{ "data_collection_enabled", "true" },
{ "device_id", "7380187414842836523" },
- { "device_platform", "web_pc" },
+ { "device_platform", "webapp" },
+ { "channel", "channel_pc_web" },
{ "focus_state", "true" },
{ "from_page", "user" },
{ "history_len", "3" },
@@ -102,6 +104,92 @@
return parameters;
}
+
+ ///
+ /// 鍒濆鍖栨姈闊崇綉椤电鐢ㄦ埛浣滃搧鍒楄〃璇锋眰鍙傛暟锛堝弬鏁版潵婧愪簬鐩爣URL锛
+ /// 閫傞厤鎺ュ彛锛歨ttps://www.douyin.com/aweme/v1/web/aweme/post/
+ ///
+ /// 鎶栭煶浣滃搧鍒楄〃璇锋眰鍙傛暟瀛楀吀
+ public static Dictionary InitializeDouyinPostParams()
+ {
+ var parameters = new Dictionary
+ {
+ // 鍩虹璁惧涓庢笭閬撳弬鏁
+ { "device_platform", "webapp" },
+ { "aid", "6383" },
+ { "channel", "channel_pc_web" },
+
+ // 鐢ㄦ埛鏍囪瘑鍙傛暟
+ { "sec_user_id", "" },
+
+ // 鍒嗛〉涓庡唴瀹瑰畾浣嶅弬鏁
+ { "max_cursor", "0" },
+ { "locate_item_id", "7576282367263807451" },
+ { "locate_query", "false" },
+ { "count", "18" },
+
+ // 瑙嗛鐩稿叧閰嶇疆鍙傛暟
+ { "show_live_replay_strategy", "1" },
+ { "need_time_list", "1" },
+ { "time_list_query", "0" },
+ { "publish_video_strategy_type", "2" },
+ { "support_h265", "1" },
+ { "support_dash", "1" },
+
+ // 鐗堟湰涓庢洿鏂板弬鏁
+ { "from_user_page", "1" },
+ { "update_version_code", "170400" },
+ { "version_code", "290100" },
+ { "version_name", "29.1.0" },
+
+ // PC绔壒鏈夊弬鏁
+ { "pc_client_type", "1" },
+ { "pc_libra_divert", "Windows" },
+ { "cpu_core_num", "32" },
+
+ // 娴忚鍣ㄧ幆澧冨弬鏁
+ { "browser_language", "zh-CN" },
+ { "browser_platform", "Win32" },
+ { "browser_name", "Chrome" },
+ { "browser_version", "142.0.0.0" },
+ { "browser_online", "true" },
+ { "engine_name", "Blink" },
+ { "engine_version", "142.0.0.0" },
+
+ // 绯荤粺鐜鍙傛暟
+ { "os_name", "Windows" },
+ { "os_version", "10" },
+ { "device_memory", "8" },
+ { "platform", "PC" },
+ { "cookie_enabled", "true" },
+
+ // 灞忓箷涓庣綉缁滃弬鏁
+ { "screen_width", "1707" },
+ { "screen_height", "1067" },
+ { "downlink", "10" },
+ { "effective_type", "4g" },
+ { "round_trip_time", "0" },
+
+ // 鐢ㄦ埛鍞竴鏍囪瘑鍙傛暟
+ { "webid", "7574080345697584675" },
+ { "uifid", "" },
+
+ // 瀹夊叏楠岃瘉涓庣鍚嶅弬鏁
+ { "msToken", "" },
+ { "a_bogus", "" },
+ { "verifyFp", "" },
+ { "fp", "" },
+ { "x-secsdk-web-expire", "" },
+ { "x-secsdk-web-signature", "" },
+
+ // 鍏朵粬杈呭姪鍙傛暟
+ { "whale_cut_token", "" },
+ { "cut_version", "1" }
+ };
+
+ return parameters;
+ }
+
// 闈欐佸熀纭鍙傛暟锛堜緵鍐呴儴鍒濆鍖栦娇鐢級
private static Dictionary GetDyBaseParameters()
{