<?xml version="1.0" encoding="utf-8"?>
<parser delay="500" crpj="true" referer="true" date="2020.10.25">
    <url><![CDATA[https?://(?:\w+\.)?yuncheapp\.cn/.*?itemId=(?<id>[^&]+)]]></url>
    <title><![CDATA[title="([^"]+)"]]></title>
    <thumbnail><![CDATA[thumbnail=([^,]+)]]></thumbnail>
    <duration><![CDATA[duration=([^,]+)]]></duration>
    <mediaUrl><![CDATA[cr_video_url=([^\$]+)]]></mediaUrl>
    <jsCode><![CDATA[
        try {
            //https://www.yuncheapp.cn/html/pearl/share/xPgc/index.html?type=6&itemId=5xxacwd5mafwe4g&userId=5x6zemgf2q6gpdc&llsid=14707322172512140570&sstoken=5xxcjqwdbrqpw2g&cid=41000&traceToken=7229402161069219059
            var itemId = window.location.href.match(/itemId=([^&]+)/)[1];
            var api_url = 'https://www.yuncheapp.cn/pearl-server/api/v1/shareInfo?app=pearl&itemId=' + itemId;
            var data = window.external.getHtmlCode(api_url);
            var jo = JSON.parse(data);
            var title = jo.data.itemInfo.caption;
            var thumbnail = jo.data.itemInfo.videoInfo.coverImg.urls[0].url;
            if (jo.data.itemInfo.thumbnails.length != 0)
                thumbnail = jo.data.itemInfo.thumbnails[0].urls[0].url;
            var duration = jo.data.itemInfo.durationMs / 1000;
            var video_url = jo.data.itemInfo.videoInfo.videoUrls[0].url;
            document.body.innerHTML = 'title=\"' + title + '\",thumbnail=' + thumbnail + ',duration=' + duration + ',cr_video_url=' + video_url + '$';
        }
        catch (ex) {
        }
    ]]></jsCode>
</parser>