优化迪士尼字幕下载
This commit is contained in:
parent
e5fec9906c
commit
18311ec29d
|
@ -16,6 +16,8 @@ namespace N_m3u8DL_RE.Parser.Processor.HLS
|
||||||
private static partial Regex YkDVRegex();
|
private static partial Regex YkDVRegex();
|
||||||
[RegexGenerator("#EXT-X-MAP:URI=\\\".*?BUMPER/[\\s\\S]+?#EXT-X-DISCONTINUITY")]
|
[RegexGenerator("#EXT-X-MAP:URI=\\\".*?BUMPER/[\\s\\S]+?#EXT-X-DISCONTINUITY")]
|
||||||
private static partial Regex DNSPRegex();
|
private static partial Regex DNSPRegex();
|
||||||
|
[RegexGenerator("#EXTINF:.*?,\\s+.*BUMPER.*\\s+?#EXT-X-DISCONTINUITY")]
|
||||||
|
private static partial Regex DNSPSubRegex();
|
||||||
[RegexGenerator("(#EXTINF.*)(\\s+)(#EXT-X-KEY.*)")]
|
[RegexGenerator("(#EXTINF.*)(\\s+)(#EXT-X-KEY.*)")]
|
||||||
private static partial Regex OrderFixRegex();
|
private static partial Regex OrderFixRegex();
|
||||||
[RegexGenerator("#EXT-X-MAP.*\\.apple\\.com/")]
|
[RegexGenerator("#EXT-X-MAP.*\\.apple\\.com/")]
|
||||||
|
@ -64,6 +66,16 @@ namespace N_m3u8DL_RE.Parser.Processor.HLS
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//针对Disney+字幕修正
|
||||||
|
if (m3u8Content.Contains("#EXT-X-DISCONTINUITY") && m3u8Content.Contains("seg_00000.vtt") && m3u8Url.Contains("media.dssott.com/"))
|
||||||
|
{
|
||||||
|
Regex ykmap = DNSPSubRegex();
|
||||||
|
if (ykmap.IsMatch(m3u8Content))
|
||||||
|
{
|
||||||
|
m3u8Content = m3u8Content.Replace(ykmap.Match(m3u8Content).Value, "#XXX");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//针对AppleTv修正
|
//针对AppleTv修正
|
||||||
if (m3u8Content.Contains("#EXT-X-DISCONTINUITY") && m3u8Content.Contains("#EXT-X-MAP") && (m3u8Url.Contains(".apple.com/") || ATVRegex().IsMatch(m3u8Content)))
|
if (m3u8Content.Contains("#EXT-X-DISCONTINUITY") && m3u8Content.Contains("#EXT-X-MAP") && (m3u8Url.Contains(".apple.com/") || ATVRegex().IsMatch(m3u8Content)))
|
||||||
{
|
{
|
||||||
|
|
|
@ -304,7 +304,7 @@ namespace N_m3u8DL_RE.CommandLine
|
||||||
|
|
||||||
public static async Task<int> InvokeArgs(string[] args, Func<MyOption, Task> action)
|
public static async Task<int> InvokeArgs(string[] args, Func<MyOption, Task> action)
|
||||||
{
|
{
|
||||||
var rootCommand = new RootCommand("N_m3u8DL-RE (Beta version) 20220901")
|
var rootCommand = new RootCommand("N_m3u8DL-RE (Beta version) 20220914")
|
||||||
{
|
{
|
||||||
Input, TmpDir, SaveDir, SaveName, BaseUrl, ThreadCount, DownloadRetryCount, AutoSelect, SkipMerge, SkipDownload, CheckSegmentsCount,
|
Input, TmpDir, SaveDir, SaveName, BaseUrl, ThreadCount, DownloadRetryCount, AutoSelect, SkipMerge, SkipDownload, CheckSegmentsCount,
|
||||||
BinaryMerge, DelAfterDone, WriteMetaJson, AppendUrlParams, ConcurrentDownload, Headers, /**SavePattern,**/ SubOnly, SubtitleFormat, AutoSubtitleFix,
|
BinaryMerge, DelAfterDone, WriteMetaJson, AppendUrlParams, ConcurrentDownload, Headers, /**SavePattern,**/ SubOnly, SubtitleFormat, AutoSubtitleFix,
|
||||||
|
|
Loading…
Reference in New Issue