diff --git a/Makhno/MakhnoInvoke.cs b/Makhno/MakhnoInvoke.cs index 65771f6..a1f5393 100644 --- a/Makhno/MakhnoInvoke.cs +++ b/Makhno/MakhnoInvoke.cs @@ -252,28 +252,6 @@ namespace Makhno }; } - var m3u8Match = Regex.Match(html, @"(https?://[^""'\s>]+\.m3u8[^""'\s>]*)", RegexOptions.IgnoreCase); - if (m3u8Match.Success) - { - return new PlayerData - { - File = m3u8Match.Groups[1].Value, - Poster = null, - Voices = new List() - }; - } - - var sourceMatch = Regex.Match(html, @"]*src=[""']([^""']+)[""']", RegexOptions.IgnoreCase); - if (sourceMatch.Success) - { - return new PlayerData - { - File = sourceMatch.Groups[1].Value, - Poster = null, - Voices = new List() - }; - } - string jsonData = ExtractPlayerJson(html); if (jsonData == null) _onLog("Makhno ParsePlayerData: file array not found"); @@ -291,6 +269,30 @@ namespace Makhno }; } + var m3u8Match = Regex.Match(html, @"(https?://[^""'\s>]+\.m3u8[^""'\s>]*)", RegexOptions.IgnoreCase); + if (m3u8Match.Success) + { + _onLog("Makhno ParsePlayerData: fallback m3u8 match"); + return new PlayerData + { + File = m3u8Match.Groups[1].Value, + Poster = null, + Voices = new List() + }; + } + + var sourceMatch = Regex.Match(html, @"]*src=[""']([^""']+)[""']", RegexOptions.IgnoreCase); + if (sourceMatch.Success) + { + _onLog("Makhno ParsePlayerData: fallback source match"); + return new PlayerData + { + File = sourceMatch.Groups[1].Value, + Poster = null, + Voices = new List() + }; + } + return null; } catch (Exception ex)