<?xml version="1.0" encoding="utf-8"?>
<parser delay="1500" date="2021.01.21">
    <url><![CDATA[https?://sports\.qq\.com/.*?game\.html?\?mid=(?<id>[^&]+)]]></url>
    <title><![CDATA[title="([^"]+)]]></title>
    <thumbnail><![CDATA[]]></thumbnail>
    <duration><![CDATA[]]></duration>
    <mediaUrl><![CDATA[cr_video_url=([^\$]+)]]></mediaUrl>
    <jsCode><![CDATA[
        try {
            //https://sports.qq.com/kbsweb/game.htm?mid=100002:20211728
            var title = document.getElementsByClassName('title').length != 0 ? document.getElementsByClassName('title')[0].innerText : document.title;
            var video_url = window.location.href;
            var entries = window.performance.getEntriesByType('resource');
            for (let i = 0; i <= entries.length - 1; i++) {
                var e = entries[i].name;
                if (e.indexOf('?vid=') != -1) {
                    var vid = e.match(/vid=([^&]+)/)[1];
                    video_url = 'https://v.qq.com/x/page/' + vid + '.html#ra';
                    break;
                }
            }
            document.body.innerHTML = 'title=\"' + title + '\",cr_video_url=' + video_url + '$';
        }
        catch (ex) {
        }
    ]]></jsCode>
</parser>