-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathyt-dlp-html-command.html
More file actions
2023 lines (1800 loc) · 75.8 KB
/
Copy pathyt-dlp-html-command.html
File metadata and controls
2023 lines (1800 loc) · 75.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html>
<head>
<title>yt-dlp 命令生成器</title>
<style>
/* 在这里添加 CSS 样式 */
html {
/* 暗色 */
--an0: rgba(46, 52, 64, 1);
--an1: rgba(59, 66, 82, 1);
--an2: rgba(67, 76, 94, 1);
--an4: rgba(76, 86, 106, 1);
/* 亮色 */
--li0: rgba(216, 222, 233, 1);
--li1: rgba(229, 233, 240, 1);
--li2: rgba(236, 239, 244, 1);
/* 主题色 */
--th0: rgba(94, 129, 172, 1);
--th1: rgba(129, 161, 193, 1);
--th2: rgba(136, 192, 208, 1);
--th3: rgba(143, 188, 187, 1);
/* 副主题色 */
--nd1: rgba(118, 78, 122, 1);
--nd2: rgba(231, 183, 234, 1);
}
body {
font: 20px/1.7 "Helvetica Neue", Arial, "Segoe UI", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif;
background-color: var(--an4);
}
fieldset { margin-bottom: 20px; color: var(--li1);background-color: var(--an0);}
label { display: inline-block; margin-bottom: 5px; }
input[type="text"], input[type="password"] {
width: 300px;
background-color: var(--li0);
color: var(--nd1);
font-size: 1em;
border: 2px solid var(--nd1);
border-radius: 3px;
}
input:focus ,input:checked{
background-color: var(--nd1);
color: var(--li1);
}
#commandOutput { width: 100%; height: 100px; }
legend {
color: var(--th3);
}
select {
background-color: var(--li0);
}
strong {
color: var(--th2);
}
.flex-container {
display: flex;
align-items: center;
}
span.wenhao i::after {
content: "";
display: inline-block;
width: 16px;
height: 16px;
background-image: url('data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiICB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIKCSB2aWV3Qm94PSIwIDAgMTYgMTYiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDE2IDE2OyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+Cgkuc3Qwe2ZpbGw6Izg4QzBEMDt9Cjwvc3R5bGU+CjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik04LDE1Yy0zLjksMC03LTMuMS03LTdzMy4xLTcsNy03czcsMy4xLDcsN1MxMS45LDE1LDgsMTV6IE04LDE2YzQuNCwwLDgtMy42LDgtOHMtMy42LTgtOC04UzAsMy42LDAsOAoJUzMuNiwxNiw4LDE2eiIvPgo8Zz4KCTxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik05LjcsMy44YzAuNCwwLjIsMC43LDAuNCwwLjksMC43czAuMywwLjYsMC4zLDFjMCwwLjMtMC4xLDAuNi0wLjIsMC44Yy0wLjEsMC4yLTAuMywwLjQtMC40LDAuNgoJCVM5LjksNy4yLDkuNyw3LjRDOS4zLDcuNiw5LjEsNy44LDguOSw4QzguOCw4LjIsOC43LDguNCw4LjcsOC43VjlIN1Y4LjdjMC0wLjQsMC0wLjcsMC4xLTFzMC4zLTAuNSwwLjQtMC42QzcuNyw2LjksOCw2LjgsOC4yLDYuNgoJCWMwLjMtMC4yLDAuNC0wLjMsMC42LTAuNUM4LjksNiw4LjksNS45LDguOSw1LjdjMC0wLjItMC4xLTAuNC0wLjMtMC41QzguNSw1LjEsOC4zLDUsOCw1UzcuNCw1LjEsNy4yLDUuMkM2LjksNS4zLDYuNyw1LjUsNi41LDUuNwoJCUw1LjMsNC44QzYsMy45LDcsMy41LDguMiwzLjVDOC43LDMuNSw5LjIsMy42LDkuNywzLjh6IE04LjYsMTAuNGMwLjIsMC4yLDAuMywwLjUsMC4zLDAuOFM4LjgsMTEuOCw4LjYsMTJzLTAuNSwwLjMtMC44LDAuMwoJCVM3LjIsMTIuMiw3LDEyYy0wLjItMC4yLTAuMy0wLjUtMC4zLTAuOHMwLjEtMC41LDAuMy0wLjhjMC4yLTAuMiwwLjUtMC4zLDAuOC0wLjNDOC4xLDEwLjEsOC40LDEwLjIsOC42LDEwLjR6Ii8+CjwvZz4KPC9zdmc+Cgo=');
background-size: contain;
background-repeat: no-repeat;
vertical-align: middle;
}
.logo-container {
display: flex;
align-items: center; /* 垂直居中对齐 */
}
.logo-container svg {
height: 3em; /* 设置与标题相同的高度 */
margin-right: 0.5em; /* Logo与标题的间距 */
}
h1 {
display: inline-block; /* 让标题水平排列 */
height: 3em;/*设定和SVG相同的高度*/
line-height: 3em;/*设定和SVG相同的高度*/
font-size: 1.5em; /* 根据需要调整字体大小 */
}
input[type="checkbox"],input[type="radio"] {
accent-color: var(--th2); /* 设置复选框的主题色 */
vertical-align: middle;
margin-right: 0.25em;
}
/* 全局复选框和单选框样式 */
input[type="checkbox"],
input[type="radio"] {
accent-color: var(--th2); /* 设置复选框和单选框的主题色 */
vertical-align: middle;
margin-right: 0.25em;
}
.option-fieldset {
background-color: var(--an1);
border: none;
border-radius: 0.4em;
padding: 1em;
min-height: 10em; /* 根据实际内容调整 */
color: var(--li1);
font-family: sans-serif;
margin-bottom: 1em;
}
.option-fieldset legend {
font-size: 1.5em;
color: var(--li2);
padding: 0 0.5em;
}
/* ... (之前的 CSS 代码) ... */
/* default-message 样式 */
.option-fieldset .default-message {
background-color: var(--nd2);
color: var(--nd1); /* 修改文字颜色为 --nd1 */
padding: 0.5em;
border-radius: 0.2em;
margin-bottom: 0.5em; /* 修改底部间距 */
}
.option-fieldset .default-message strong {
font-weight: bold;
color: var(--nd1);
}
/* 锁链图标样式 */
.option-fieldset .default-message a svg {
width: 1.5em;
height: 1.5em;
vertical-align: middle;
fill: none;
stroke: var(--th0);
padding-left: 3em; /* 添加左内边距 */
}
.option-fieldset .default-message a:hover svg {
stroke: var(--th1);
}
.option-fieldset .input-label {
display: block;
margin-top: 0.5em;
color: var(--li1);
background-color: var(--an2);
padding: 0.25em;
border-radius: 0.2em;
margin-bottom: 0;
line-height: 2em; /* 调整行高 */
box-sizing: border-box;
}
.option-fieldset input[type="file"],
.option-fieldset input[type="text"],
.option-fieldset input[type="password"] {
background-color: var(--an2);
border: 1px solid transparent;
border-bottom: 1px solid var(--li1);
color: var(--li1);
padding: 0.25em;
border-radius: 0.2em;
width: 100%;
line-height: 2em; /* 调整行高 */
box-sizing: border-box;
}
.option-fieldset input[type="file"]:focus,
.option-fieldset input[type="text"]:focus,
.option-fieldset input[type="password"]:focus {
outline: none;
border-bottom: 2px solid var(--th2);
}
.option-fieldset input[type="text"]:disabled,
.option-fieldset input[type="file"]:disabled,
.option-fieldset input[type="password"]:disabled,
.option-fieldset select:disabled {
cursor: not-allowed;
border-bottom: 1px solid var(--nd1); /* 修改底部边框颜色 */
}
.option-fieldset .checkbox-label {
display: flex;
align-items: center; /* 垂直居中对齐 */
margin-top: 0.5em;
}
.option-fieldset .checkbox-label span.wenhao {
display: inline-block;
margin-left: 0.25em;
}
.option-fieldset p {
/* 移除 align-self: baseline; */
}
/* 第二层 fieldset 样式 */
.nested-fieldset {
border-left: 3px solid var(--th1); /* 加粗左边框 */
border-top: none;
border-right: none;
border-bottom: none;
background-color: transparent;
padding-left: 1.5em;
margin-top: 1em;
border-radius: 0; /* 移除圆角 */
}
.nested-fieldset legend {
color: var(--th1);
font-size: 0.9em;
font-weight: normal;
}
/* 第三层 fieldset 样式 */
.nested-fieldset-deeper {
border-left: 2px solid var(--th2);
border-top: none;
border-right: none;
border-bottom: none;
background-color: transparent;
padding-left: 1.5em;
margin-top: 1em;
border-radius: 0; /* 移除圆角 */
}
.nested-fieldset-deeper legend {
color: var(--th2);
font-size: 0.8em;
font-weight: normal;
}
#outputTemplateBuilder {
display: inline-flex; /* 使用 inline-flex,使元素水平排列 */
align-items: center;
margin-bottom: 0.5em; /* 使用 em 单位实现自适应间距 */
border-radius: 2em; /* 添加圆角 */
background-color: var(--th0); /* 使用主题色变量 */
padding: 0.3em 0.6em; /* 使用 em 单位实现自适应内边距 */
color: var(--li0); /* 使用亮色变量 */
}
#outputTemplateBuilder select.template-variable {
margin-right: 0.25em;
padding: 0.3em;
background-color: transparent;
border: none;
color: var(--li0);
appearance: none;
-webkit-appearance: none;
-moz-appearance: none;
padding-right: 1.5em;/*为箭头留出空间*/
background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12"><path fill="%23FFFFFF" d="M10.293 3.293a1 1 0 0 1 1.414 1.414l-5 5a1 1 0 0 1-1.414 0l-5-5a1 1 0 1 1 1.414-1.414L6 7.586l4.293-4.293z"/></svg>');/*添加背景svg*/
background-repeat: no-repeat;/*不重复*/
background-position: right .5em center;/*定位箭头*/
}
#outputTemplateBuilder button#addTemplateVariable {
padding: 0.3em 0.6em; /* 使用 em 单位实现自适应内边距 */
border: none;
background-color: transparent; /* 透明背景 */
color: var(--li0); /* 使用亮色变量 */
cursor: pointer;
font-weight: bold; /* 加粗 */
}
#outputTemplateBuilder span.variable-display {
background-color: var(--li2); /* 使用亮色变量 */
padding: 0.3em; /* 使用 em 单位实现自适应内边距 */
margin-left: 0.25em; /* 使用 em 单位实现自适应间距 */
border-radius: 3px;
color: var(--an4); /* 使用暗色变量 */
border: 1px solid var(--an2);
}
/* 移除 select 和 button 的默认样式 */
#outputTemplateBuilder select.template-variable,
#outputTemplateBuilder button#addTemplateVariable {
appearance: none;
-webkit-appearance: none;
-moz-appearance: none;
}
#outputTemplateBuilderSpan {
display: block;
align-items: center;
margin-bottom: 0.5em;
min-height: 2.5em; /* 设置最小高度,确保有足够的空间显示 span */
}
#outputTemplateBuilderSpan span {
background-color: var(--th0); /* 使用主题色作为背景 */
color: var(--li0); /* 使用亮色作为文字颜色 */
padding: 0.3em 0.6em; /* 设置内边距 */
border-radius: 2em; /* 设置圆角 */
margin-right: 0.25em; /* 设置右边距 */
display: inline-flex;
align-items: center;
}
#outputTemplateBuilderSpan span button.remove-variable {
background-color: transparent; /* 设置背景透明 */
border: none; /* 移除边框 */
color: var(--li0); /* 设置文字颜色 */
font-weight: bold; /* 文字加粗 */
cursor: pointer;
margin-left: 0.25em; /* 设置左边距 */
}
#outputTemplateBuilderSpan span button.remove-variable:hover {
color: var(--li1); /* 鼠标悬停时更改文字颜色 */
}
#outputTemplateBuilder select.template-variable {
margin-right: 0.25em;
padding: 0.3em;
background-color: var(--th0); /* 使用主题色作为背景 */
color: var(--li0); /* 使用亮色作为文字颜色 */
border: none; /* 移除边框 */
appearance: none; /* 移除默认样式 */
-webkit-appearance: none;
-moz-appearance: none;
}
#outputTemplateBuilder select.template-variable option {
background-color: var(--th0); /* 保持选项背景色与下拉菜单一致 */
color: var(--li0); /* 保持选项文字颜色与下拉菜单一致 */
}
#commandOutputCard {
position: fixed;
bottom: 1em;
right: 1em;
background-color: var(--an1);
border-radius: 0.5em;
padding: 1em;
box-shadow: 0 0.2em 0.5em rgba(0, 0, 0, 0.2);
display: flex;
flex-direction: column;
max-width: 80%; /* 设置最大宽度 */
box-sizing: border-box; /* 确保内边距和边框包含在宽度内 */
}
#commandArea {
background-color: var(--an2);
display: flex;
align-items: center;
margin-bottom: 0.5em;
border-radius: 0.3em;
padding: 0.5em;
}
#commandOutput {
background-color: transparent;
color: var(--li0);
border: none;
overflow-x: auto;
white-space: pre-wrap;
flex: 1;
margin-right: 0.5em;
resize: none;
outline: none;
box-shadow: none;
}
#generateButton {
background-color: var(--th0);
color: var(--li0);
padding: 0.5em 1em;
border: none;
border-radius: 0.3em;
cursor: pointer;
align-self: flex-end;
}
#generateButton:hover {
background-color: var(--th1);
}
#actionButtons {
display: flex;
justify-content: flex-start;
}
#copyCommandButton, #resetSettingsButton {
background-color: transparent;
color: var(--li0);
padding: 0.5em 1em;
border: 2px solid var(--an2);
border-radius: 0.3em;
cursor: pointer;
margin-right: 0.5em;
}
#copyCommandButton:hover, #resetSettingsButton:hover {
background-color: rgba(255, 255, 255, 0.1);
}
#pageFooter {
height: calc(3em + 2px); /* 与 commandOutputCard 高度相似 */
background-color: var(--an1); /* 与 commandOutputCard 相同 */
border-radius: 0.5em; /* 与 commandOutputCard 相同 */
padding: 1em; /* 与 commandOutputCard 相同 */
box-shadow: 0 0.2em 0.5em rgba(0, 0, 0, 0.2); /* 与 commandOutputCard 相同 */
color: var(--li0);
display: flex;
align-items: center;
margin-top: 1em; /* 顶部间距,与 commandOutputCard 底部间距一致 */
}
#pageFooter a {
color: var(--li0);
text-decoration: none;
}
#pageFooter a:hover {
text-decoration: underline;
}
.preset-select { /* 假设 outputTemplateBuilder 的下拉选单使用了 .preset-select 类名 */
background-color: var(--an2);
border: 1px solid transparent;
border-bottom: 1px solid var(--li1);
color: var(--li1);
padding: 0.25em;
border-radius: 0.2em;
width: 100%;
height: 34.0333px;
box-sizing: border-box;
appearance: none;
-webkit-appearance: none;
-moz-appearance: none;
}
.preset-select:focus {
outline: none;
border-bottom: 2px solid var(--th2);
}
.select-wrapper {
position: relative;
display: inline-block;
width: 100%;
}
.select-arrow {
position: absolute;
top: 50%;
right: 0.5em;
width: 0;
height: 0;
border-left: 0.5em solid transparent;
border-right: 0.5em solid transparent;
border-top: 0.5em solid var(--li1);
pointer-events: none;
transform: translateY(-50%);
}
body {
padding-bottom: calc(4em + 2px); /* 为 footer 留出空间, footer的height+footer的bottom的1em */
margin-left: 20%;
}
nav {
position: fixed;
top: 0;
left: 0;
width: 20%;
height: 100vh;
background-color: var(--an4);
padding: 0.5em;
border-radius: 0 0.2em 0.2em 0;
box-sizing: border-box;
display: flex;
flex-direction: column;
overflow-y: auto;
-ms-overflow-style: none; /* IE 和 Edge */
scrollbar-width: none; /* Firefox */
}
nav::-webkit-scrollbar {
display: none; /* Chrome, Safari, Opera */
}
.nav-list {
list-style: none;
padding: 0;
margin: 0;
flex-grow: 1;
}
.nav-item {
margin-bottom: 0.5em;
}
.nav-link {
display: block;
text-decoration: none;
color: var(--li1);
padding: 0.5em 1em;
border-radius: 0.2em;
text-align: center;
}
.nav-link:hover {
background-color: var(--th1);
color: var(--li0);
}
.nav-footer {
padding: 1em;
text-align: center;
}
.logo-circle {
width: 80px; /* 设置圆圈大小 */
height: 80px;
border-radius: 50%; /* 设置为圆形 */
background-color: var(--th1); /* 主题色背景 */
display: flex;
justify-content: center;
align-items: center;
margin: 0 auto 0.5em; /* 上下外边距和水平居中 */
}
.logo-circle svg {
width: 50px; /* 设置 SVG 大小 */
height: auto;
fill: var(--li0); /* 设置 SVG 填充色,确保 logo 颜色和背景对比 */
}
.nav-title {
margin: 0;
font-size: 1.2em;
color: var(--th1); /* 主题色文字 */
}
/* 响应式样式 */
@media (max-width: 768px) {
body {
margin-left: 0;
}
nav {
position: static;
width: 100%;
height: auto;
border-radius: 0 0 0 0;
overflow-y: visible;
flex-direction: row;
justify-content: space-between;
align-items: center;
}
.nav-list {
display: flex;
flex-wrap: wrap;
flex-grow: 0;
}
.nav-item {
margin-right: 1em;
}
.nav-footer {
padding: 0.5em;
text-align: left;
}
#commandOutputCard {
max-width: none; /* 移除最大宽度限制 */
}
}
.theme-toggle-button {
width: 40px;
height: 40px;
border-radius: 50%;
margin: 1em auto;
border: none;
cursor: pointer;
background-repeat: no-repeat;
background-position: center;
background-size: 80%;
flex-shrink: 0; /* 防止按钮缩小 */
}
/* 亮色主题 SVG 背景 */
.light .theme-toggle-button {
background-image: url("data:image/svg+xml,%3Csvg version='1.1' xml:space='preserve' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1081.68 974.18' fill='%232b6674'%3E%3Cpath d='M682.123,407.071h244.64L452.31,881.524H344.817l142.336-284.672H320.723L557.95,122.399h266.509 L682.123,407.071z'/%3E%3C/svg%3E");
}
/* OLED 主题 SVG 背景 */
.oled-theme .theme-toggle-button {
background-image: url("data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1081.68 974.18' fill='%23000000'%3E%3Cpath d='M779.279,78.421c55.322,0,100.169,44.847,100.169,100.169v690.05 c0,55.322-44.847,100.169-100.169-100.169H445.383c-55.322,0-100.169-44.847-100.169-100.169V178.59 c0-55.322,44.847-100.169,100.169-100.169H779.279z M500.988,780.136c-18.441,0-33.39,14.949-33.39,33.39 c0,18.44,14.949,33.39,33.39,33.39c18.441,0,33.39-14.949,33.39-33.39C534.378,795.085,519.429,780.136,500.988,780.136 M612.286,780.136c-18.44,0-33.39,14.949-33.39,33.39c0,18.44,14.949,33.39,33.39,33.39c18.441,0,33.39-14.949,33.39-33.39 C645.676,795.085,630.727,780.136,612.286,780.136 M723.585,780.136c-18.44,0-33.39,14.949-33.39,33.39 c0,18.44,14.949,33.39,33.39,33.39c18.441,0,33.39-14.949,33.39-33.39C756.975,795.085,742.026,780.136,723.585,780.136'/%3E%3C/svg%3E");
}
/* 默认主题 SVG 背景 */
body:not(.light):not(.oled-theme) .theme-toggle-button {
background-image: url("data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1081.68 974.18' fill='rgb(129, 161, 193)'%3E%3Cpath d='M697.269,391.847h273.36L440.476,922H320.363l159.046-318.092H293.441L558.518,73.755h297.797 L697.269,391.847z M418.11,868.985l424.123-424.123h-230.7L770.579,126.77H591.238L379.177,550.893h185.968L406.099,868.985H418.11z'/%3E%3C/svg%3E");
}
.light {
--th0: #88c0d0;
--th1: #2b6674;
--th2: #4d6268;
--th3: #d0e6ed;
--th4: #4d6268;
--li0: #2e3132;
--li1: #0c4f5d;
--an0: #f2f4f5;
--an1: #e9ecef; /* 修改按钮悬停背景色 */
--an2: #d1d3d5; /* 修改导航栏背景色 */
--an3: #c2c4c6; /* 修改导航项背景色 */
--an4: #d9dadb;
--li2: #53686e;
}
.light body {
background-color: var(--th0);
color: var(--th1);
}
.light nav {
background-color: var(--an2);
}
.light .nav-link {
background-color: var(--an3);
color: var(--li1);
}
.light .nav-link:hover {
background-color: var(--an4);
color: var(--li0);
}
.light #commandOutputCard {
background-color: var(--an4); /* 修改背景色 */
border: 1px solid var(--an4); /* 修改边框颜色 */
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* 添加阴影 */
transition: box-shadow 0.3s ease; /* 添加过渡效果 */
}
.light #commandOutputCard:hover {
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2); /* 鼠标悬停时增加阴影 */
}
.light button {
background-color: var(--an0);
color: var(--li0);
border: none;
padding: 0.5em 1em;
border-radius: 0.2em;
}
.light button:hover {
background-color: var(--an1);
}
.light .logo-circle svg {
fill: var(--th3); /* 设置 SVG 填充色,确保 logo 颜色和背景对比 */
}
.oled-theme {
--th0: #000; /* 主要背景色 */
--th1: #fff; /* 主要文字颜色 */
--th2: #111; /* 辅助背景色 */
--th3: #aaa; /* 辅助文字颜色 */
--th4: #333; /* 边框和分隔线颜色 */
--li0: #fff; /* 亮色文字 */
--li1: #ccc; /* 暗色文字 */
--an0: #222; /* 按钮背景色 */
--an1: #333; /* 按钮悬停背景色 */
--an2: #111; /* 导航栏背景色 */
--an3: #222; /* 导航项背景色 */
--an4: #111; /* 导航栏背景色 */
}
.oled-theme .nav-link:hover {
background-color: transparent; /* 移除悬停背景色 */
border: 1px solid #fff; /* 添加白色边框 */
color: var(--li0); /* 保持悬停文字颜色 */
}
.oled-theme button:hover {
background-color: transparent; /* 移除悬停背景色 */
border: 1px solid #fff; /* 添加白色边框 */
color: var(--li0); /* 保持悬停文字颜色 */
}
.oled-theme .logo-circle svg {
fill: #000; /* 修改 SVG 填充色为黑色 */
}
.oled-theme strong,
.oled-theme .nested-fieldset-deeper legend {
color: #fff; /* 设置字体颜色为白色 */
}
.oled-theme .nested-fieldset-deeper {
border-left: 1px solid #fff; /* 设置左边框为白色 */
}
.oled-theme #generateButton:hover {
background-color: transparent; /* 移除悬停背景色 */
border: 1px solid #fff; /* 添加白色边框 */
color: var(--li0); /* 保持悬停文字颜色 */
}
.oled-theme .theme-toggle-button:hover {
background-color: transparent; /* 移除悬停背景色 */
border: 1px solid #fff; /* 添加白色边框 */
}
</style>
</head>
<body>
<nav>
<ul class="nav-list">
<li class="nav-item"><a href="#nav-path" class="nav-link">路径</a></li>
<li class="nav-item"><a href="#nav-output" class="nav-link">输出</a></li>
<li class="nav-item"><a href="#nav-basic" class="nav-link">基本</a></li>
<li class="nav-item"><a href="#nav-video-format" class="nav-link">视频格式</a></li>
<li class="nav-item"><a href="#nav-post-processing" class="nav-link">后处理</a></li>
<li class="nav-item"><a href="#nav-subtitles" class="nav-link">字幕</a></li>
<li class="nav-item"><a href="#nav-login-auth" class="nav-link">登录认证</a></li>
<li class="nav-item"><a href="#nav-cookies" class="nav-link">Cookies</a></li>
<li class="nav-item"><a href="#nav-proxy" class="nav-link">网络代理</a></li>
<li class="nav-item"><a href="#nav-config" class="nav-link">配置文件</a></li>
</ul>
<div class="nav-footer">
<div class="logo-circle">
<svg id="e7953a2d-a027-4888-b15e-60e9d4874846" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1081.68 974.18"><path d="M732.6,815.88c0-35,10.19-68,35-97.92l-155.17,0,0-98.56,492.85.12,0,98.56h-21c22.25,29.89,31.79,62.33,31.78,94.12C1116,924.72,1041,980,924,980,806.33,980,732.57,923.36,732.6,815.88ZM1004.17,718,849,718c-19.72,22.25-32.45,49.59-32.45,78.84,0,58.51,48.3,84.6,107.44,84.61,58.51,0,108.12-26,108.14-84.55C1032.13,767.63,1021.33,740.28,1004.17,718Z" transform="translate(-34.38 -5.82)"/><path d="M612.5,443.88l492.86.13,0,98.56-492.85-.13Z" transform="translate(-34.38 -5.82)"/><path d="M109.1,620.51l492.86.13,0,98.56-492.85-.12Z" transform="translate(-34.38 -5.82)"/><path d="M56.11,620.51l492.86.13,0,98.56-492.85-.12Z" transform="translate(-34.38 -5.82)"/><path d="M109.1,443.88,602,444l0,98.56-492.85-.13Z" transform="translate(-34.38 -5.82)"/><path d="M117.93,267.25l492.86.12,0,98.57-492.85-.13Z" transform="translate(-34.38 -5.82)"/><path d="M618.63,267.78h25.44c-25.43-29.9-36.23-63.6-36.22-98,0-109.37,75.08-164,193.36-164s191.4,54.74,191.37,167.93c0,32.44-12.09,66.14-32.44,94.12l150.71,0,0,98.57-492.21-.13Zm108.12,0,153.26,0a124,124,0,0,0,28.63-79.48c0-58.51-49.58-84-107.45-84-59.78,0-108.76,24.78-108.77,83.92C692.41,217.56,705.77,244.91,726.75,267.81Z" transform="translate(-34.38 -5.82)"/><path d="M379.06,171.69V276H579.37v78.85H379.06v92.22H558.39V524H379.06V635.92H602.9v78.85h-545V635.92h237.2V524H113.24V457.22l-5.72,8.27L34.38,422.88C87.8,352.3,122.14,278.52,145,191.4l80.77,17.81C218.17,233.37,211.17,255,203.54,276h91.57V171.69ZM119.59,447.05H295.11V354.83h-124C156.48,386.63,139.31,416.52,119.59,447.05Z" transform="translate(-34.38 -5.82)"/></svg>
</div>
<h1 class="nav-title">yt-dlp 命令生成器</h1>
</div>
<button class="theme-toggle-button"></button>
</nav>
<fieldset class="option-fieldset">
<legend id="nav-path">路径选项</legend>
<label class="input-label" for="pathsInput">文件路径:</label>
<input type="text" id="pathsInput" placeholder="例如: home:~/Downloads">
<p>指定文件下载路径。</p>
<label class="input-label" for="outputNaPlaceholderInput">不可用字段占位符:</label>
<input type="text" id="outputNaPlaceholderInput" placeholder="默认: NA">
<p>指定 --output 中不可用字段的占位符。</p>
<div class="checkbox-label">
<input type="checkbox" id="restrictFilenamesCheckbox">
<label for="restrictFilenamesCheckbox">
限制文件名
<span class="wenhao" title="将文件名限制为仅 ASCII 字符,并避免文件名中的 '&' 和空格。">
<i></i>
</span>
</label>
</div>
<div class="checkbox-label">
<input type="checkbox" id="noRestrictFilenamesCheckbox">
<label for="noRestrictFilenamesCheckbox">
允许 Unicode 字符文件名
<span class="wenhao" title="允许文件名中使用 Unicode 字符、'&' 和空格(默认)。">
<i></i>
</span>
</label>
</div>
<div class="checkbox-label">
<input type="checkbox" id="mtimeCheckbox">
<label for="mtimeCheckbox">
使用修改时间
<span class="wenhao" title="使用 Last-modified 标头设置文件修改时间(默认)。">
<i></i>
</span>
</label>
</div>
<div class="checkbox-label">
<input type="checkbox" id="noMtimeCheckbox">
<label for="noMtimeCheckbox">
不使用修改时间
<span class="wenhao" title="不使用 Last-modified 标头设置文件修改时间。">
<i></i>
</span>
</label>
</div>
<div class="checkbox-label">
<input type="checkbox" id="windowsFilenamesCheckbox">
<label for="windowsFilenamesCheckbox">
Windows 兼容文件名
<span class="wenhao" title="强制文件名与 Windows 兼容。">
<i></i>
</span>
</label>
</div>
<div class="checkbox-label">
<input type="checkbox" id="noWindowsFilenamesCheckbox">
<label for="noWindowsFilenamesCheckbox">
最小化文件名清理
<span class="wenhao" title="仅对文件名进行最小化清理。">
<i></i>
</span>
</label>
</div>
</fieldset>
<fieldset class="option-fieldset">
<legend id="nav-output">输出选项</legend>
<div id="outputTemplateBuilder">
<select class="template-variable">
<optgroup label="基本信息">
<option value="%(title)s">标题</option>
<option value="%(fulltitle)s">完整标题</option>
<option value="%(alt_title)s">备选标题</option>
<option value="%(id)s">ID</option>
<option value="%(uploader)s">上传者</option>
<option value="%(duration_string)s">视频时长</option>
<option value="%(description)s">视频描述</option>
</optgroup>
<optgroup label="频道信息">
<option value="%(channel)s">频道名称</option>
<option value="%(channel_id)s">频道ID</option>
<option value="%(channel_url)s">频道URL</option>
</optgroup>
<optgroup label="播放列表">
<option value="%(playlist)s">播放列表</option>
<option value="%(playlist_index)s">播放列表索引</option>
</optgroup>
<optgroup label="上传日期">
<option value="%(upload_date>%Y)s">上传年份</option>
<option value="%(upload_date>%M)s">上传月份</option>
<option value="%(upload_date>%D)s">上传日期</option>
</optgroup>
<optgroup label="发布日期">
<option value="%(release_date>%Y)s">发布年份</option>
<option value="%(release_date>%M)s">发布月份</option>
<option value="%(release_date>%D)s">发布日期</option>
</optgroup>
<optgroup label="剧集信息">
<option value="%(series)s">剧集</option>
<option value="%(season_number)s">季数</option>
<option value="%(episode_number)s">集数</option>
<option value="%(episode)s">剧集名</option>
</optgroup>
<optgroup label="分隔符">
<option value=".">.</option>
<option value=" "> </option>
<option value="-">-</option>
<option value="/">/</option>
<option value="\\">\\</option>
</optgroup>
<optgroup label="扩展名">
<option value="%(ext)s">扩展名</option>
</optgroup>
</select>
<button id="addTemplateVariable">+</button>
</div>
<div id="outputTemplateBuilderSpan"></div>
<label for="outputInput" class="input-label">输出模板:</label>
<input type="text" id="outputInput" value="%(title)s.%(ext)s">
<p>
<strong>输出模板构建器说明:</strong><br>
使用此构建器,您可以自定义下载文件的输出路径和文件名。您可以选择不同的变量(例如:标题、上传者、日期等)来构建您的模板。
<br>
<strong>如何使用:</strong>
<ol>
<li>
从下拉列表中选择您想要添加的变量或分隔符。
</li>
<li>
点击“+”按钮将其添加到模板中。
</li>
<li>
您可以通过点击变量旁边的“x”按钮来删除已添加的变量。
</li>
<li>
您可以在“输出模板”文本框中直接编辑模板。
</li>
</ol>
<strong>提示:</strong>
<ul>
<li>
<code>%(title)s</code> 代表视频标题。
</li>
<li>
<code>%(uploader)s</code> 代表上传者名称。
</li>
<li>
<code>%(upload_date>%Y%m%d)s</code> 代表上传日期(年月日)。
</li>
<li>
<code>%(ext)s</code> 代表文件扩展名。
</li>
<li>
您可以使用分隔符(例如:`.`, `-`, `_`)来连接不同的变量。
</li>
</ul>
<strong>示例:</strong>
<ul>
<li>
<code>%(title)s.%(ext)s</code> - 将下载文件命名为视频标题,并使用原始扩展名。
</li>
<li>
<code>%(uploader)s/%(title)s-%(upload_date>%Y%m%d)s.%(ext)s</code> - 将文件保存在上传者命名的文件夹中,并使用标题-上传日期.扩展名的格式。
</li>
</ul>
</p>
</fieldset>
<fieldset class="option-fieldset">
<legend id="nav-basic">基本选项</legend>
<label class="input-label" for="urlInput">URL:</label>
<input type="text" id="urlInput" placeholder="请输入 yt-dlp 支持的下载链接">
<div class="checkbox-label">
<input type="checkbox" id="verboseCheckbox">
<label for="verboseCheckbox">
详细输出
<span class="wenhao" title="终端的信息会更加详细,显示 yt-dlp 运行的详细日志和调试信息。">
<i></i>
</span>
</label>
</div>
<div class="checkbox-label">
<input type="checkbox" id="noWarningsCheckbox">
<label for="noWarningsCheckbox">
无警告
<span title="禁用 yt-dlp 的警告信息,只显示错误信息。" class="wenhao">
<i></i>
</span>
</label>
</div>
<div class="checkbox-label">
<input type="checkbox" id="simulateCheckbox">
<label for="simulateCheckbox">
模拟
<span title="模拟下载过程,不实际下载文件,用于测试命令是否正确。" class="wenhao">
<i></i>
</span>
</label>
</div>
<div class="checkbox-label">
<input type="checkbox" id="noSimulateCheckbox">
<label for="noSimulateCheckbox">
不模拟
<span title="取消模拟下载,执行实际的下载操作。" class="wenhao">
<i></i>
</span>
</label>
</div>
<div class="checkbox-label">
<input type="checkbox" id="forceIpv4Checkbox">
<label for="forceIpv4Checkbox">强制 IPv4</label>
</div>
<div class="checkbox-label">
<input type="checkbox" id="forceIpv6Checkbox">
<label for="forceIpv6Checkbox">强制 IPv6</label>
</div>
<div class="checkbox-label">
<input type="checkbox" id="flatPlaylistCheckbox">
<label for="flatPlaylistCheckbox">扁平播放列表</label>
</div>
<div class="checkbox-label">
<input type="checkbox" id="liveFromStartCheckbox">
<label for="liveFromStartCheckbox">直播从头开始</label>
</div>
</fieldset>
<fieldset class="option-fieldset">
<legend id="nav-video-format">视频格式选项</legend>
<div class="checkbox-label">
<input type="checkbox" id="listFormatsCheckbox">
<label for="listFormatsCheckbox">
列出格式
<span class="wenhao" title="勾选此复选框将在终端中列出所有可用的视频格式,而不是下载视频。这等同于在命令行中使用 -F 或 --list-formats 选项。">
<i></i>
</span>
</label>
</div>
<div>
<label for="formatPresetSelect" class="preset-label">预设:</label>
<div class="select-wrapper">
<select id="formatPresetSelect" class="preset-select">
<option value="bestvideo+bestaudio">最佳音画</option>
<option value="bestvideo">最佳视频(无音频)</option>
<option value="bestaudio">最佳音频</option>
<option value="height:480">小于 480p</option>
<option value="height:720">小于 720p</option>