<?xml version="1.0" encoding="utf-8"?>
<parser delayLoad="1500" crpj="true" date="2020.04.27">
    <url><![CDATA[https?://(?:www\.)?kklusdy2\.com/index\.php/vod/play/id/(?<id>[^/]+).*?\.html?]]></url>
    <title><![CDATA[<h4\s+class="title">([^<]+)</h4>]]></title>
    <thumbnail><![CDATA[thumbnail=([^,]+)]]></thumbnail>
    <duration><![CDATA[]]></duration>
    <mediaUrl><![CDATA[cr_video_url=([^\$]+)]]></mediaUrl>
    <jsCode><![CDATA[
        try {
            var url = window.player_data.url;
            video_url = url;
            if (url.indexOf('.m3u8') == -1) {
                var html = window.external.GetHtmlCode(url);
                //window.external.ReceiveContent(html);
                if (html.indexOf('.m3u8') != -1) {
                    var m3u8_url = html.match(/['\"]([^'\"]+.m3u8)/)[1];
                    if (m3u8_url.indexOf(':') == -1) {
                        var domain = url.split('/')[2];
                        video_url = domain + m3u8_url;
                    }
                }
            }

            //thumbnail
            var id = window.location.href.match(/id\/([^\/]+)/)[1];
            url = 'https://kklusdy2.com/index.php/vod/detail/id/' + id + '.html';
            html = window.external.GetHtmlCode(url);
            thumbnail = (html.indexOf('data-original=') != -1) ? html.match(/data-original=\"([^\"]+)/)[1] : '';

            document.body.innerHTML = 'thumbnail=' + thumbnail + ',cr_video_url=' + video_url + '$' + document.body.innerHTML;
        }
        catch (ex) {
        }
    ]]></jsCode>
</parser>