<?xml version="1.0" encoding="utf-8"?>
<patterns date="2021.04.09">
    <item domain="google">
        <url><![CDATA[google\.com(?:\.\w+)?/search\?.*?tbm=vid]]></url>
        <title><![CDATA[<title>(.*)\s+-\s+[^<]+</title>]]></title>
        <content><![CDATA[(?is)<div\s+class="g">.*?<a\s+href="(?<url>[^"]+).*?<h3[^>]+><span>(?<title>[^<]+).*?<span[^>]*>.*?<div[^>]+>(?<duration>[^<]*)</div></a>.*?<div.*?<div[^>]+>(?<date>[^·<]+)]]></content>
    </item>
    <item domain="bing">
        <url><![CDATA[bing\.com/videos/search\?.*?q=[^$]+]]></url>
        <title><![CDATA[<title>(.*)\s+-\s+[^<]+</title>]]></title>
        <content><![CDATA[(?is)<div\s+class="dg[^"]*?".*?<a.*?href="(?<url>[^"]+)".*?(?<duration>\d+:[^<]+).*?<strong>(?<title>[^<]+)]]></content>
    </item>
    <item domain="baidu">
        <url><![CDATA[baidu\.com/sf/vsearch\?.*?pd=video]]></url>
        <title><![CDATA[query\s+:\s+"([^"]+)"]]></title>
        <content><![CDATA[(?is)<div\s+class="video_list.*?href="(?<url>[^"]+).*?video_play_timer">(?<duration>(?:[^<]+)?).*?video-title[^>]+>(?<title>.+?)</a>.*?发布时间：(?<date>[^<]+)]]></content>
    </item>
    <item domain="yahoo">
        <url><![CDATA[yahoo\.com/search/video]]></url>
        <title><![CDATA[<title>(.*)\s+-\s+[^<]+</title>]]></title>
        <content><![CDATA[(?is)<li\s+class="vr[^"]*?".*?data-rurl="(?<url>[^"]+).*?<img\s+src="(?<thumbnail>[^"]+).*?v-time.*?>(?<duration>[^<]+).*?<h3[^>]*>(?<title>.+?)</h3>.*?</li>]]></content>
    </item>
    <item domain="yandex">
        <url><![CDATA[yandex\.\w+/video/search\?.*?text=[^&]+]]></url>
        <title><![CDATA["query":"([^"]+)]]></title>
        <content><![CDATA[(?is)<img.*?thumb-image__image"\s+src="(?<thumbnail>[^"]+).*?meta-badge__duration[^>]+>(?<duration>[^<]+).*?serp-item__title[^>]+>(?<title>.*?)</a>.*?noopener".*?href="(?<url>[^"]+)]]></content>
    </item>
    <item domain="ask">
        <url><![CDATA[ask\.com/youtube\?.*?q=[^$]+]]></url>
        <title><![CDATA["query":"([^"]+)"]]></title>
        <content><![CDATA[(?is)<a\s+id=.*?href='//(?<url>[^']+).*?title="(?<title>[^"]+).*?<img\s+src="(?<thumbnail>[^"]+).*?Published in : (?<date>[^<]+)]]></content>
    </item>
    <item domain="baidu">
        <url><![CDATA[//v.baidu\.com/v\?.*?]]></url>
        <title><![CDATA[wd:\s+'([^']+)']]></title>
        <content><![CDATA[(?is)<li\s+class="result".*?".*?<a.*?href="(?<url>[^"]+)".*?title="(?<title>[^"]+).*?<img[^>]+src="(?<thumbnail>[^"]+).*?<span\s+class="info">(?<duration>(?:[^<]+)?)</span>]]></content>
        <baseUrl><![CDATA[https?://[^/]+]]></baseUrl>
    </item>
    <item domain="baidu">
        <url><![CDATA[(?:haokan|sv)\.baidu\.com/(?:author/(?<id>\d+)|.*?author\?app_id=(?<id>\d+))]]></url>
        <title><![CDATA[uinfo-head-name">([^<]+)<]]></title>
        <content><![CDATA[(?is)tplName.*?vid":"(?<url>[^"]+).*?publish_time":"(?<date>[^"]+).*?title":"(?<title>[^"]+).*?duration":"(?<duration>[^"]+)]]></content>
        <baseUrl><![CDATA[https://haokan.baidu.com/v?vid=]]></baseUrl>
        <jsCode><![CDATA[
            try {
                //https://haokan.baidu.com/author/1668044200932811
                var title = document.getElementsByClassName('uinfo-head-name')[0].outerHTML;
                var id = window.__PRELOADED_STATE__.author_info.id;
                var url = 'https://haokan.baidu.com/author/' + id + '?_format=json&rn=16&_api=1&ctime='
                var ct = '';
                var html = '';
                var p = 0;
                while (true) {
                    var data = window.external.getHtmlCode(url + ct);
                    var jo = JSON.parse(data);
                    var video = jo.data.video;
                    //丢给crpj解决。这里，解不出720p视频。匹配中，不取全数据
                    html += JSON.stringify(video.results);
                    if (!video.has_more || p > 399)
                        break;

                    p++;
                    ct = video.ctime;
                    window.external.doEvents();
                }

                html = title + '$' + html;
                //避免下句赋值过慢，快速返回
                if (typeof(window.external.receive) != 'undefined')
                    window.external.receive(html);
                //奇怪的时，有些机器上，document.getElementsByTagName('html')[0].innerHTML会引发[该操作的目标元件无效]错误
                else
                    document.body.innerHTML = html;
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="hao123" redirect="true">
        <url><![CDATA[(?:haokan|sv)\.hao123\.com/(?:author/(?<id>\d+)|.*?author\?app_id=(?<id>\d+))]]></url>
        <title><![CDATA[]]></title>
        <content><![CDATA[]]></content>
        <baseUrl><![CDATA[]]></baseUrl>
        <jsCode><![CDATA[
            try {
                //https://haokan.hao123.com/author/1668044200932811
                var pl_url = window.location.href.replace('hao123', 'baidu');
                document.body.innerHTML = 'cr_playlist_url=' + pl_url + '$';
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="baidu">
        <url><![CDATA[author\.baidu\.com/home]]></url>
        <title><![CDATA[title:"([^"]+)]]></title>
        <content><![CDATA[(?is)v_title:"(?<title>[^"]+)",video_url:"(?<url>[^"]+)",duration:(?<duration>[^,]+),date:(?<date>[^;]+)]]></content>
        <jsCode><![CDATA[
            try {
                //https://author.baidu.com/home/1545804016056250
                //https://author.baidu.com/home/1608787013884995
                //不直找视频地址，拿高点的分辨率
                var host = window.runtime.host;
                var uk = window.runtime.user.uk;
                var api_url = host + '/webpage?tab=video&uk=' + uk + '&type=newhome&action=dynamic&format=jsonp&ctime=';
                var title = document.title + ' - 视频';
                var html = 'title:\"' + title + '\"$'
                var ct = 0;
                while (true) {
                    var data = window.external.getHtmlCodeEx(api_url + ct, 'Cookie: ' + document.cookie);
                    data = data.substring(9, data.length - 1);
                    var jo = JSON.parse(data);
                    //内容位置错误，遍历获取
                    for (var i in jo.data.list) {
                        var item = jo.data.list[i].itemData;
                        html += 'v_title:\"' + item.title + '\",video_url:\"' + item.url + '\",duration:' + item.duration + ',date:' + item.publish_at + ';\r\n';
                    }
                    if (!jo.data.hasMore)
                        break;

                    ct = jo.data.query.ctime;
                    window.external.doEvents();
                }

                if (typeof(window.external.receive) != 'undefined')
                    window.external.receive(html);
                else {
                    document.head.innerHTML = '';
                    document.body.innerHTML = html;
                }
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="youtube" delay="500">
        <url><![CDATA[youtube\.com/.*?list=(?<id>[0-9A-Za-z-_]{10,})]]></url>
        <title><![CDATA[(?:title:"([^"]+)|<h3>(?<title>[^<]+)</h3>|"title":"([^"]+))]]></title>
        <content><![CDATA[(?is)v_title:"(?<title>[^"]*)",thumbnail:"(?<thumbnail>[^"]*)",video_url:"(?<url>[^"]+)",duration:(?<duration>[^;]+)|<tr>\s+<td\s+data-label="Image".*?src="(?<thumbnail>[^"]+).*?Title">\s+(?<title>[^<]+).*?v=(?<url>[^"]+).*?</tr>]]></content>
        <baseUrl><![CDATA[https://www.youtube.com/watch?v=]]></baseUrl>
        <jsCode><![CDATA[
            try {
                var html = '';
                //single page...https://www.youtube.com/playlist?list=PLA-9kehfPNSALTRPlPma_6P-21zBKfiBV
                if (window.ytInitialData && window.ytInitialData.contents &&
                    (JSON.stringify(window.ytInitialData.contents).indexOf('playlistPanelVideoRenderer') != -1 || JSON.stringify(window.ytInitialData.contents).indexOf('playlistVideoRenderer') != -1)) {
                    var playlist = window.ytInitialData.contents.twoColumnWatchNextResults ? window.ytInitialData.contents.twoColumnWatchNextResults.playlist.playlist : window.ytInitialData.contents.twoColumnBrowseResultsRenderer.tabs[0].tabRenderer.content.sectionListRenderer.contents[0].itemSectionRenderer.contents[0].playlistVideoListRenderer;
                    var pl_title = playlist.title || window.ytInitialData.metadata.playlistMetadataRenderer.title;
                    html = 'title:\"' + pl_title + '\"$'
                    for (var i = 0; i <= playlist.contents.length - 1; i++) {
                        var video = playlist.contents[i].playlistPanelVideoRenderer || playlist.contents[i].playlistVideoRenderer;
                        var duration = video.lengthText ? video.lengthText.simpleText : 0;
                        html += 'v_title:\"' + video.title.simpleText + '\",thumbnail:\"' + video.thumbnail.thumbnails[video.thumbnail.thumbnails.length - 1].url + '\",video_url:\"' + video.videoId + '\",duration:' + duration + ';';
                    }

                    //multi pages...https://www.youtube.com/playlist?list=PLBHgMN3r4ZNwObXsF5soCCCh0bvBNpgN2
                    var pl_id = window.external.url.match(/list=([^&]+)/)[1];
                    var pl_url = 'https://www.youtube.com/playlist?list=' + pl_id;
                    var pl_html = window.external.getHtmlCodeEx(pl_url, 'User-Agent: ' + navigator.userAgent + '\r\nCookie: ' + document.cookie);
                    if (pl_html.indexOf('\"nextContinuationData\":{\"continuation\":') != -1) {
                        var client_name = document.head.innerHTML.match(/client\.name=(\d+)/)[1];
                        var client_version = document.head.innerHTML.match(/client.version=([^\\]+)/)[1];
                        var headers = 'User-Agent: ' + navigator.userAgent + '\r\X-YouTube-Client-Name: ' + client_name + '\r\X-YouTube-Client-Version: ' + client_version;
                        var ctoken = pl_html.match(/continuation\":\"([^\"]+)/)[1];
                        var itct = pl_html.match(/clickTrackingParams\":\"([^\"]+)/)[1];
                        var api_url = 'https://www.youtube.com/browse_ajax?ctoken=' + ctoken + '&continuation=' + ctoken + '&itct=' + itct;
                        var data = window.external.getHtmlCodeEx(api_url, headers);
                        while (true) {
                            var jo = JSON.parse(data)[1];
                            var playlist = jo.response.continuationContents.playlistVideoListContinuation;
                            for (var i = 0; i <= playlist.contents.length - 1; i++) {
                                var video = playlist.contents[i].playlistVideoRenderer;
                                var duration = video.lengthText ? video.lengthText.simpleText : 0;
                                html += 'v_title:\"' + video.title.simpleText + '\",thumbnail:\"' + video.thumbnail.thumbnails[video.thumbnail.thumbnails.length - 1].url + '\",video_url:\"' + video.videoId + '\",duration:' + duration + ';';
                            }
                            if (!jo.response.continuationContents.playlistVideoListContinuation.continuations)
                                break;

                            var next_cd = jo.response.continuationContents.playlistVideoListContinuation.continuations[0].nextContinuationData;
                            ctoken = next_cd.continuation;
                            itct = next_cd.clickTrackingParams;
                            api_url = 'https://www.youtube.com/browse_ajax?ctoken=' + ctoken + '&continuation=' + ctoken + '&itct=' + itct;
                            data = window.external.getHtmlCodeEx(api_url, headers);
                            window.external.doEvents();
                        }
                    }
                }
                //https://music.youtube.com/playlist?list=RDCLAK5uy_nW_Xd94ynvL3pIdTApbNN11s-QrzsYU5U
                else if (window.external.url.indexOf('music') != -1) {
                    var data = window.external.getHtmlCode(window.external.url);
                    if (data && data.indexOf('musicResponsiveListItemRenderer') != -1) {
                        data = data.replace(/\\\\\"/g, '\"');
                        var pl_title = data.match(/musicDetailHeaderRenderer.*?text\":\"([^\"]+)/)[1];
                        html = 'title:\"' + pl_title + '\"$'
                        data = data.match(/(\"contents\":\[\{\"musicResponsiveListItemRenderer.*?\]),\"collapsedItemCount/)[1];
                        //JSON.parse有特殊字符问题，直解吧
                        var p = new RegExp('musicResponsiveListItemRenderer.*?videoId\":\"([^\"]+).*?text\":\"([^\"]+).*?musicResponsiveListItemFixedColumnRenderer.*?text\":\"([^\"]+)', 'gi');
                        while ((m = p.exec(data)) != null) {
                            var title = m[2] || '';
                            html += 'v_title:\"' + title + '\",thumbnail:\",video_url:\"' + m[1] + '\",duration:' + m[3] + ';';
                        }
                        data = data.substr(0, data.length - 1);
                    }
                }
                //others...
                if (!html) {
                    var pl_id = window.external.url.match(/list=([^&]+)/)[1];
                    var pl_url = 'https://www.youtube.com/playlist?list=' + pl_id;
                    var api_url = 'https://odownloader.com/download?q=' + encodeURIComponent(pl_url);
                    html = window.external.getHtmlCode(api_url, api_url);
                }

                if (typeof(window.external.receive) != 'undefined')
                    window.external.receive(html);
                else
                    document.body.innerHTML = html;
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="youtube">
        <url><![CDATA[youtube\.com/.*?search_query=(?<id>[^&]+)]]></url>
        <title><![CDATA[title:"([^"]+)]]></title>
        <content><![CDATA[(?is)v_title:"(?<title>[^"]+)",thumbnail:"(?<thumbnail>[^"]+)",video_url:"(?<url>[^"]+)",duration:(?<duration>[^;]+)]]></content>
        <baseUrl><![CDATA[https://www.youtube.com]]></baseUrl>
        <jsCode><![CDATA[
            try {
                //https://www.youtube.com/results?search_query=%E9%A3%8E%E7%AD%9D
                var title = decodeURIComponent(window.location.href.match(/search_query=([^&]+)/)[1]);
                var html = 'title:\"' + title + '\"$';
                var args = {\"context\":{\"client\":{\"clientName\": \"WEB\",\"clientVersion\": \"2.20210120.08.00\"}},\"query\": title};
                var headers = 'Content-Type: application/json';
                var m = document.head.innerText.match(/INNERTUBE_API_KEY\":\"([^\"]+)/);
                var key = m ? m[1] : 'AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8';
                var api_url = 'https://www.youtube.com/youtubei/v1/search?key=' + key;
                var p = 0;
                while (true) {
                    if (p > 9)
                         break;

                    var data = window.external.getPostResultEx(api_url, JSON.stringify(args), headers);
                    var jo = JSON.parse(data);
                    try {
                        var videos = jo.contents ? jo.contents.twoColumnSearchResultsRenderer.primaryContents.sectionListRenderer.contents[0].itemSectionRenderer.contents : jo.onResponseReceivedCommands[0].appendContinuationItemsAction.continuationItems[0].itemSectionRenderer.contents;
                        for (var i in videos) {
                            //only get video
                            var video = videos[i].videoRenderer;
                            //only get video
                            if (!video)
                                continue;

                            html += 'v_title:\"' + video.title.runs[0].text + '\",thumbnail:\"' + video.thumbnail.thumbnails[0].url + '\",video_url:\"/watch?v=' + video.videoId + '\",duration:' + video.lengthText.simpleText + ';';
                        }
                    }
                    catch (ex) {
                        break;
                    }
                    if (data.indexOf('\"token\"') == -1)
                        break;

                    args.continuation = data.match(/\"token\":\s*\"([^\"]+)/)[1];
                    p++;
                    window.external.doEvents();
                }

                if (typeof(window.external.receive) != 'undefined')
                    window.external.receive(html);
                else {
                    document.head.innerHTML = '';
                    document.body.innerHTML = html;
                }
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="lynda">
        <url><![CDATA[lynda\.com/(?:[^/]+/){2,3}(?<id>\d+-2)\.html?]]></url>
        <title><![CDATA[<title>([^<]+)</title>]]></title>
        <content><![CDATA[(?is)<div\s+class="row video-row">.*?<a.*?href="(?<url>[^"]+).*?>(?<title>[^<]+).*?<span\s+class="video-duration">(?<duration>[^<]+)</span>]]></content>
    </item>
    <item domain="educourse">
        <url><![CDATA[educourse\.ga/(?:[^/]+/){2,3}(?<id>\d+-2)\.html?]]></url>
        <title><![CDATA[<title>([^<]+)</title>]]></title>
        <content><![CDATA[(?is)<div\s+class="row video-row">.*?<a.*?href="(?<url>[^"]+).*?>(?<title>[^<]+).*?<span\s+class="video-duration">(?<duration>[^<]+)</span>]]></content>
    </item>
    <item domain="bilibili" watchList="true" delay="4500">
        <url><![CDATA[bilibili\.com/video/(?:av|BV)(?<id>[^/?]+).*?[?&]p=\d+]]></url>
        <title><![CDATA[title"?:"([^"]+)]]></title>
        <content><![CDATA[(?is)(?:<li(?:\s+class="watched\s+on")?><a\s+title="(?<title>[^"]+).*?href="(?:/video.*?p=)?(?<url>[^"]+).*?duration">(?<duration>[^<]+).*?</li>|\{.*?page":(?<url>\d+),.*?part":"(?<title>[^"]+)","duration":(?<duration>\d+).*?\}\})]]></content>
        <baseUrl><![CDATA[https?://(?:www\.)?bilibili\.com/.*?p=]]></baseUrl>
        <ckSign><![CDATA[SESSDATA]]></ckSign>
        <jsCode><![CDATA[
            try {
                //直取源码在有些用户机子上不返回结果，由crpj取
                //正则后段内容，对应主页视频列表中列表，不可去。且title亦加双引
                //https://www.bilibili.com/video/BV1wb411p715?p=2
                //https://www.bilibili.com/video/av76315580?t=39&p=10
                //https://www.bilibili.com/video/av19377766/?p=2
                var title = (document.getElementsByClassName('video-title').length != 0) ? document.getElementsByClassName('video-title')[0].innerText : document.title;
                var html = 'title:\"' + title + '\"$';
                //若页页有信息，构建所需数据
                if (window.__INITIAL_STATE__ && window.__INITIAL_STATE__.videoData && window.__INITIAL_STATE__.videoData.pages.length != 0) {
                    var pages = window.__INITIAL_STATE__.videoData.pages;
                    for (var i = 0; i <= pages.length - 1; i++) {
                        var item = pages[i];
                        html += '<li><a title=\"' + item.part + '\" href=\"' + item.page + '\"><div class=\"duration\">' + item.duration + '</div></a></li>\r\n';
                    }
                }
                else if (document.getElementsByClassName('list-box').length != 0)
                    html += document.getElementsByClassName('list-box')[0].innerHTML;
                else
                    html += '$error=列表信息获取错误。$';

                if (typeof(window.external.receive) != 'undefined')
                    window.external.receive(html);
                else
                    document.body.innerHTML = html;
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="bilibili" crpj="true">
        <url><![CDATA[bilibili\.com/bangumi/media/\w+]]></url>
        <title><![CDATA[<meta\s+content="([^"]+)"\s+property="og:title">]]></title>
        <content><![CDATA[(?is)\{"aid".*?"cover":"(?<thumbnail>[^"]+).*?long_title":"(?<title>[^"]+)","share_url":"(?<url>[^"]+)]]></content>
        <ckSign><![CDATA[SESSDATA]]></ckSign>
        <jsCode><![CDATA[
            try {
                var season_id= window.__INITIAL_STATE__.mediaInfo.season_id;
                var url = 'https://api.bilibili.com/pgc/web/season/section?season_id=' + season_id;
                var data = window.external.getHtmlCode(url);
                document.body.innerHTML += '$' + data;
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="bilibili" watchList="true" updateTitle="true">
        <url><![CDATA[bilibili\.com/bangumi/play/(?<id>\w+)]]></url>
        <title><![CDATA[<meta\s+content="([^"]+)"\s+property="og:title">]]></title>
        <content><![CDATA[(?is)\{"loaded":(?:true|false),"id":(?<url>\d+),.*?"cover":"(?<thumbnail>[^"]+).*?titleFormat":"(?<title>[^"]+)]]></content>
        <baseUrl><![CDATA[https://www.bilibili.com/bangumi/play/ep]]></baseUrl>
        <ckSign><![CDATA[SESSDATA]]></ckSign>
        <jsCode><![CDATA[
            try {
                document.body.innerHTML = JSON.stringify(window.__INITIAL_STATE__.epList);
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="bilibili">
        <url><![CDATA[search\.bilibili\.com/.*?keyword=.+$]]></url>
        <title><![CDATA[<title[^>]+>(.+?)\s-\s.+?</title>]]></title>
        <content><![CDATA[(?is)<li\s+class="video[^>]+matrix"><a href="//(?<url>[^"]+)".+?title="(?<title>[^"]+).*?so-imgTag_rb">(?<duration>[^<]+?)</span>.*?icon-date"></i>(?<date>[^<]+)]]></content>
        <ckSign><![CDATA[SESSDATA]]></ckSign>
    </item>
    <item domain="bilibili" crpj="true">
        <url><![CDATA[bilibili\.com/\d+/channel/detail\?cid=(?<id>\d+)]]></url>
        <title><![CDATA["name":"([^"]+)"]]></title>
        <content><![CDATA[(?is)[\[,]\{"aid.*?"pic":"(?<thumbnail>[^"]+)","title":"(?<title>[^"]+).*?pubdate":(?<date>[^,]+).*?"duration":(?<duration>\d+).*?bvid":"(?<url>[^"]+)]]></content>
        <baseUrl><![CDATA[https://www.bilibili.com/video/]]></baseUrl>
        <ckSign><![CDATA[SESSDATA]]></ckSign>
        <jsCode><![CDATA[
            try {
                //https://space.bilibili.com/19577966/channel/detail?cid=94947
                var m = window.location.href.match(/(\d+)\/channel\/detail\?cid=(\d+)/);
                var mid = m[1];
                var cid = m[2];
                var api_url = 'https://api.bilibili.com/x/space/channel/video?mid=' + mid + '&cid=' + cid + '&ps=30&pn=';
                var html = '';
                var p = 1;
                while (true) {
                    var data = window.external.getHtmlCode(api_url + p);
                    if (data.indexOf('archives\":[{') == -1)
                        break;

                    html += data;
                    p++;
                    window.external.doEvents();
                }

                if (typeof(window.external.receive) != 'undefined')
                    window.external.receive(html);
                else
                    document.body.innerHTML =  html;
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="bilibili" crpj="true">
        <url><![CDATA[bilibili\.com/medialist/[^/]+/ml(?<id>[^?/]+)]]></url>
        <title><![CDATA[title:"([^"]+)]]></title>
        <content><![CDATA[(?is)\{"id".*?"title":"(?<title>[^"]+).*?cover":"(?<thumbnail>[^"]+).*?duration":(?<duration>\d+).*?pubtime":(?<date>[^,]+).*?bvid":"(?<url>[^"]+)]]></content>
        <baseUrl><![CDATA[https://www.bilibili.com/video/]]></baseUrl>
        <ckSign><![CDATA[SESSDATA]]></ckSign>
        <jsCode><![CDATA[
            try {
                //https://www.bilibili.com/medialist/play/ml1048258548/p1
                //https://www.bilibili.com/medialist/detail/ml414541623?type=1
                var title = document.getElementsByClassName('media-title').length != 0 ? document.getElementsByClassName('media-title')[0].innerText : document.title;
                var html = '';
                var mid = window.external.url.match(/ml([^?/]+)/)[1];
                //get ids
                var ids = '';
                var p = 1;
                var idx = 0;
                var api_url = 'https://api.bilibili.com/x/v3/fav/resource/ids?media_id=' + mid;
                var data = window.external.getHtmlCode(api_url);
                if (data.indexOf('data') != -1) {
                    var jo = JSON.parse(data);
                    for (var m in jo.data) {
                        var media = jo.data[m];
                        ids += media.id + ':' + media.type + ',';
                        //每20个取一次
                        if (idx >= 19 || m == jo.data.length - 1) {
                            api_url = 'https://api.bilibili.com/x/v3/fav/resource/infos?resources=' + encodeURIComponent(ids);
                            html += window.external.getHtmlCode(api_url);
                            if (!title && html.indexOf('\"name\"') != -1)
                                title = html.match(/name\":\"([^\"]*)/)[1];
                            idx = 0;
                            ids = '';
                        }
                        else
                            idx++;
                    }
                }

                html = 'title:\"' + title + '\"$' + html;
                if (typeof(window.external.receive) != 'undefined')
                    window.external.receive(html);
                else {
                    document.head.innerHTML = '';
                    document.body.innerHTML = html;
                }
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="bilibili" crpj="true">
        <url><![CDATA[bilibili\.com/medialist/[^/]+/watchlater]]></url>
        <title><![CDATA[title:"([^"]+)]]></title>
        <content><![CDATA[(?is)\{"id".*?cover":"(?<thumbnail>[^"]+).*?duration":(?<duration>\d+).*?"title":"(?<title>[^"]+)","type.*?bv_id":"(?<url>[^"]+)]]></content>
        <baseUrl><![CDATA[https://www.bilibili.com/video/]]></baseUrl>
        <ckSign><![CDATA[SESSDATA]]></ckSign>
        <jsCode><![CDATA[
            try {
                //https://www.bilibili.com/medialist/play/watchlater/p1
                var cookie = window.external.getCookie(window.location.href) || document.cookie;
                if (cookie.indexOf('DedeUserID') != -1) {
                    var uid = cookie.match(/DedeUserID=([^;]+)/)[1];
                    var data = window.external.getHtmlCode('https://space.bilibili.com/' + uid);
                    var title = data.match(/<title>([^<]+)\s+-\s+/)[1] + ' - 稍后再看';
                    var api_url = 'https://api.bilibili.com/x/v1/medialist/resource/list?type=2&biz_id=' + uid + '&offset_index=0&offset=0&from=web&first_page=true&ps=20&page_direction=false&sort_desc=0';
                    data = window.external.getHtmlCode(api_url, window.location.href);

                    var jo = JSON.parse(data);
                    if (jo.data) {
                        var html = 'title:\"' + title + '\"$' + data;
                        while (true) {
                            api_url = 'https://api.bilibili.com/x/v1/medialist/resource/list?type=2&biz_id=' + uid + '&offset=' + jo.data.nextOffset + '&from=web&first_page=false&ps=20&page_direction=false&sort_desc=0'
                            data = window.external.getHtmlCode(api_url, window.location.href);
                            html += data;
                            jo = JSON.parse(data);
                            if (!jo.data.hasMore)
                               break;

                           window.external.doEvents();
                        }

                        if (typeof(window.external.receive) != 'undefined')
                            window.external.receive(html);
                        else {
                            document.head.innerHTML = '';
                            document.body.innerHTML = html;
                        }
                    }
                }
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="bilibili" crpj="true" delay="4500">
        <url><![CDATA[bilibili\.com/(?<id>\d+)/video\??]]></url>
        <title><![CDATA[<title>([^-]+)[^<]+</title>]]></title>
        <content><![CDATA[(?is)pic":"(?<thumbnail>[^"]+).*?title":"(?<title>[^"]+).*?created":(?<date>[^,]+).*?length":"(?<duration>[^"]+).*?bvid":"(?<url>[^"]+)]]></content>
        <baseUrl><![CDATA[https://www.bilibili.com/video/]]></baseUrl>
        <ckSign><![CDATA[SESSDATA]]></ckSign>
        <total><![CDATA[total:([^,]+)]]></total>
        <startPage><![CDATA[startPage:([^,]+)]]></startPage>
        <hasMore><![CDATA[hasMore:([^,]+)]]></hasMore>
        <jsCode><![CDATA[
            try {
                //https://space.bilibili.com/19577966/video
                var href = window.location.href;
                var mid = href.match(/(\d+)\/video/)[1];
                var tid = href.indexOf('tid') != -1 ? href.match(/tid=([^&]+)/)[1] : 0;
                var data = '';
                if (href.indexOf('page=') == -1) {
                    var m = document.body.innerHTML.match(/be-pager-total\">共\s+(\d+)\s+页/);
                    var pageNumber = m ? parseInt(m[1]) : 1;
                    var p = parseInt(window.external.sp) || 1;
                    var pmax = (window.external.sp != undefined) ? 49 : 99;
                    var pidx = 0;
                    var total = 0;
                    var hasMore = false;
                    while (true) {
                        if (pidx > pmax || p > pageNumber) {
                            hasMore = (p <= pageNumber);
                            break;
                        }

                        var url = 'https://api.bilibili.com/x/space/arc/search?mid=' + mid + '&ps=30&tid=' + tid + '&pn=' + p;
                        data += '$' + JSON.stringify(JSON.parse(window.external.getHtmlCode(url)));
                        p++;
                        pidx++;
                        hasMore = true;
                        window.external.doEvents();
                    }
                    data = 'total:' + total + ',startPage:' + p + ',hasMore:' + hasMore + ',' + data;
                }
                else {
                    var p = href.match(/page=(\d+)/)[1];
                    document.title = document.title.replace(' - ', ' p' + p + ' - ');
                    var url = 'https://api.bilibili.com/x/space/arc/search?mid=' + mid + '&ps=30&tid=' + tid + '&pn=' + p;
                    data += JSON.stringify(JSON.parse(window.external.getHtmlCode(url)));
                }
                document.body.innerHTML = data;
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="bilibili" crpj="true" delay="2500">
        <url><![CDATA[bilibili\.com/(?<id>\d+)/favlist\??]]></url>
        <title><![CDATA[title:"([^"]+)]]></title>
        <content><![CDATA[(?is)[[,]\{"id.*?title":"(?<title>[^"]+).*?cover":"(?<thumbnail>[^"]+).*?duration":(?<duration>[^,]+).*?bvid":"(?<url>[^"]+)]]></content>
        <baseUrl><![CDATA[https://www.bilibili.com/video/]]></baseUrl>
        <ckSign><![CDATA[SESSDATA]]></ckSign>
        <jsCode><![CDATA[
            try {
                //https://space.bilibili.com/440697835/favlist
                var user_name = document.getElementById('h-name') ? document.getElementById('h-name').innerText : document.title.substr(0, document.title.indexOf(' - '));
                var fav_name = document.getElementsByClassName('favInfo-details').length != 0 ?document.getElementsByClassName('favInfo-details')[0].firstElementChild.innerText : '';
                var title = fav_name ? user_name + '-' + fav_name : user_name;
                var mid = document.getElementsByClassName('fav-item cur')[0].outerHTML.match(/fid=([^\"&]+)/)[1];
                var api_url = 'https://api.bilibili.com/x/v3/fav/resource/list?media_id=' + mid + '&ps=20&keyword=&order=mtime&type=0&tid=0&jsonp=jsonp&pn=';
                var headers = 'Cookie: ' + window.external.getCookie('https://www.bilibili.com');
                var p = 1;
                var html = 'title:\"' + title + '\"$'
                while (true) {
                    var data = window.external.getHtmlCodeEx(api_url + p, headers);
                    if (data.indexOf('medias\":[{') == -1)
                        break;

                    html += data;
                    p++;
                    window.external.doEvents();
                }

                document.getElementsByTagName('html')[0].innerHTML = html;
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="bilibili" crpj="true" delay="2500">
        <url><![CDATA[bilibili\.com/watchlater/#/list]]></url>
        <title><![CDATA[title:"([^"]+)]]></title>
        <content><![CDATA[(?is)\{"aid.*?pic":"(?<thumbnail>[^"]+).*?title":"(?<title>[^"]+).*?duration":(?<duration>[^,]+).*?bvid":"(?<url>[^"]+)]]></content>
        <baseUrl><![CDATA[https://www.bilibili.com/video/]]></baseUrl>
        <ckSign><![CDATA[SESSDATA]]></ckSign>
        <jsCode><![CDATA[
            try {
                var api_url = 'https://api.bilibili.com/x/v2/history/toview/web?jsonp=jsonp&_=' + Date.now();
                var data = window.external.getHtmlCode(api_url, window.location.href);
                document.body.innerHTML = 'title:\"稍后再看\"$' + data;
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="bilibili" crpj="true" delay="500">
        <url><![CDATA[h\.bilibili\.com/(?<id>\d+)]]></url>
        <title><![CDATA[<div\s+class="description[^>]+>([^<]+)</div>]]></title>
        <content><![CDATA[(?is)<img\s+src="(?<thumbnail>.*?/(?<title>\w+)\.j[^"]+).*?track-name="detail_big"\s+data-photo-imager-src="(?<url>[^"]+)">]]></content>
        <ckSign><![CDATA[SESSDATA]]></ckSign>
    </item>
    <item domain="bilibili" crpj="true" delay="500">
        <url><![CDATA[bilibili\.com/(?<id>\d+)/album\??]]></url>
        <title><![CDATA[title:"([^"]+)]]></title>
        <content><![CDATA[(?is)img_src":"(?<url>(?<thumbnail>.*?/(?<title>\w+)\.[jwpg][^"]+))"]]></content>
        <ckSign><![CDATA[SESSDATA]]></ckSign>
        <jsCode><![CDATA[
            try {
                var title = document.getElementById('h-name').innerText + '-相簿';
                var userId = window.external.url.match(/\/(\d+)\//)[1];
                var url = 'https://api.vc.bilibili.com/link_draw/v1/doc/doc_list?uid=' + userId + '&page_size=30&&biz=all&page_num=';
                var p = 0;
                var html = 'title:\"' + title + '\"$'
                while (true) {
                    var data = window.external.getHtmlCode(url + p);
                    if (data.indexOf('items\":[{') == -1)
                        break;

                    html += data;
                    p++;
                    window.external.doEvents();
                }

                document.getElementsByTagName('html')[0].innerHTML = html;
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="bilibili" crpj="true" delay="500">
        <url><![CDATA[bilibili\.com/video/(?<id>(?:av|BV)[^/?#&]+).*?#iv]]></url>
        <title><![CDATA[title:"([^"]+)]]></title>
        <content><![CDATA[(?is)v_title:"(?<title>[^"]+)",video_url:"(?<url>[^"]+)"]]></content>
        <ckSign><![CDATA[SESSDATA]]></ckSign>
        <jsCode><![CDATA[
            try {
                //互动视频 https://www.bilibili.com/video/av64006660
                var href = window.location.href;
                var base_url = 'https://www.bilibili.com/' + href.match(/video\/[^\/?#]+/)[0];
                var title = window.__INITIAL_STATE__ && window.__INITIAL_STATE__.videoData ? window.__INITIAL_STATE__.videoData.title : document.title;
                var html = 'title:\"' + title + '\"$'
                var args = 'id=cid:1&', id_args = ''
                if (window.__INITIAL_STATE__ && window.__INITIAL_STATE__.aid)
                    id_args= 'aid=' + window.__INITIAL_STATE__.aid;
                else if (href.indexOf('/av') != -1)
                    id_args= 'aid=' + href.match(/av(\d+)/)[1];
                else if (href.indexOf('/BV') != -1)
                    id_args= 'bvid=' + href.match(/BV[^\/#]+/)[0];
                else
                    return;
                args += id_args;
                var api_url = 'https://api.bilibili.com/x/player.so?' + args;
                var data = window.external.getHtmlCode(api_url, href);
                if (data.indexOf('graph_version') == -1)
                    return;

                var cids = '';
                var gv = data.match(/graph_version\":([^,]+)/)[1];
                api_url = 'https://api.bilibili.com/x/stein/nodeinfo?' + id_args + '&graph_version=' + gv;
                html += getChioceVideo();
                if (typeof(window.external.receive) != 'undefined')
                    window.external.receive(html);
                else
                    document.body.innerHTML = html;

                //...
                function getChioceVideo(option, cid, node_id) {
                    var node_url = node_id ? api_url + '&node_id=' + node_id : api_url;
                    var data = window.external.getHtmlCode(node_url, href);
                    var jo = JSON.parse(data);
                    if (!cid)
                        cid = jo.data.story_list[0].cid;
                    var v_title = jo.data.title;
                    if (option) {
                        var re = new RegExp(jo.data.title + '$');
                        if (!re.test(option))
                            v_title = option + '>' + v_title;
                    }
                    var result = 'v_title:\"' + v_title + '\",video_url:\"' + base_url + '#cid=' + cid + '\";\r\n';
                    //递归分支
                    if (data.indexOf('choices') != -1) {
                        var choices = jo.data.edges.choices;
                        for (var i = 0; i <= choices.length - 1; i++) {
                            var choice = choices[i];
                            //避免死循环
                            if (cids.indexOf(choice.cid) != -1)
                                continue;
                            cids +=',' + choice.cid;
                            result += getChioceVideo(choice.option, choice.cid, choice.node_id);
                        }
                    }
                    return result;
                }
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="acfun" watchList="true" delay="500">
        <url><![CDATA[acfun\.cn/\w+/(?<id>\w+\d+)_\d+]]></url>
        <title><![CDATA[<h1\s+class="title">(?:<span>)?([^<]+)]]></title>
        <content><![CDATA[(?is)<li\s+title="(?<title>[^"]+)"\s+class="single-p.*?data-href="(?<url>[^"]+).*?duration="(?<duration>[^"]+).*?date="(?<date>[^"]+)]]></content>
        <baseUrl><![CDATA[https://www.acfun.cn]]></baseUrl>
        <jsCode><![CDATA[
            try {
                //https://www.acfun.cn/v/ac11449015_2
                //https://www.acfun.cn/v/ac15429966_2
                //https://www.acfun.cn/bangumi/aa6000986_36188_1709075
                //https://www.acfun.cn/bangumi/aa6000575_36188_1701302
                var ul = undefined;
                for (var i = 0; i <= document.getElementsByTagName('ul').length - 1; i++) {
                    var cn = document.getElementsByTagName('ul')[i].className;
                    if (cn.indexOf('scroll-div') != -1) {
                        ul = document.getElementsByTagName('ul')[i];
                        break;
                    }
                }
                if (ul) {
                    for (let i = 0; i <= ul.childElementCount - 1; i++) {
                        var li = ul.childNodes[i];
                        var vl = window.pageInfo.videoList || window.bangumiList.items;
                        for (let j in vl) {
                            var video = vl[j];
                            var title = li.title || li.innerText.trim();
                            if (video.title == title || video.episodeName == title) {
                                var duration = video.durationMillis ? video.durationMillis / 1000 : 0;
                                li.setAttribute('duration', duration);
                                li.setAttribute('title', title);
                                li.setAttribute('date', video.uploadTime);
                                break;
                            }
                        }
                    }
                }
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="acfun" delay="500">
        <url><![CDATA[acfun\.cn/bangumi/(?<id>[a-z]+\d+)$]]></url>
        <title><![CDATA[<h1\s+class="title">(?:<span>)?([^<]+)]]></title>
        <content><![CDATA[(?is)<li\s+title="(?<title>[^"]+)"\s+class="single-p.*?data-href="(?<url>[^"]+).*?duration="(?<duration>[^"]+).*?date="(?<date>[^"]+)]]></content>
        <baseUrl><![CDATA[https://www.acfun.cn]]></baseUrl>
        <jsCode><![CDATA[
            try {
                //https://www.acfun.cn/bangumi/aa6000575
                var ul = undefined;
                for (var i = 0; i <= document.getElementsByTagName('ul').length - 1; i++) {
                    var cn = document.getElementsByTagName('ul')[i].className;
                    if (cn.indexOf('scroll-div') != -1) {
                        ul = document.getElementsByTagName('ul')[i];
                        break;
                    }
                }
                if (ul) {
                    for (let i = 0; i <= ul.childElementCount - 1; i++) {
                        var li = ul.childNodes[i];
                        var vl = window.bangumiList.items;
                        for (let j in vl) {
                            var video = vl[j];
                            var title = li.title || li.innerText.trim();
                            if (video.title == title || video.episodeName == title) {
                                var duration = video.durationMillis ? video.durationMillis / 1000 : 0;
                                li.setAttribute('duration', duration);
                                li.setAttribute('title', title);
                                li.setAttribute('date', video.updateTime);
                                break;
                            }
                        }
                    }
                }
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="acfun" crpj="true" delay="500">
        <url><![CDATA[acfun\.cn/u/(?<id>\d+)]]></url>
        <title><![CDATA[title:"([^"]+)]]></title>
        <content><![CDATA[(?is)<a.*?href="(?<url>[^"]+).*?<img[^.>]+src="(?<thumbnail>[^"]+).*?title\s+line">(?<title>[^<]+).*?date">(?<date>[^<]+)]]></content>
        <baseUrl><![CDATA[https://www.acfun.cn]]></baseUrl>
        <jsCode><![CDATA[
            try {
                //https://www.acfun.cn/u/13606113
                var title = document.body.innerHTML.match(/data-username=\"([^\"]+)/)[1];
                var uid = window.location.href.match(/u\/(\d+)/)[1];
                var api_url = 'https://www.acfun.cn/u/' + uid + '?quickViewId=ac-space-video-list&reqID=3&ajaxpipe=1&type=video&order=newest&pageSize=20';
                var p = 1;
                var html = 'title:\"' + title + '\"$';
                while (true) {
                    var data = window.external.getHtmlCode(api_url + '&page=' + p + '&t=' + Date.now(), window.location.href);
                    if (data.indexOf('css\":[]') != -1)
                        break;

                    data = data.replace(/\\\\\"/g, '\"');
                    html += data;
                    p++;
                    window.external.doEvents();
                }

                document.getElementsByTagName('html')[0].innerHTML = html;
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="163" crpj="true" delay="500">
        <url><![CDATA[163\.com/(?:special/(?:[^/]+/(?<id>[^.]+)\.html?|(?<id>[^/]+))|.*?courseintro\?.*[/F](?<id>[^.]+)\.html?)]]></url>
        <title><![CDATA[title:"([^"]+)]]></title>
        <content><![CDATA[(?is)(?:<td\s+class="u-ctitle">\s*(?<title>[^<]+)\s*<a\s+href="(?<url>[^"]+)">(?<describe>[^<]+).*?(?:<img[^>]+src="(?<thumbnail>[^"]+)"|\s*)|href="(?<url>[^"]+).*?jj">(?<title>[^<]+).*?thide">(?<describe>[^<]+)<)]]></content>
        <jsCode><![CDATA[
            try {
                var title = document.title;
                if (document.getElementsByClassName('content-title').length != 0)
                    title = document.getElementsByClassName('content-title')[0].innerText;
                else if (document.getElementsByTagName('h1').length >= 2)
                    title = document.getElementsByTagName('h1')[1].innerText;
                else if (document.getElementsByTagName('h2').length != 0)
                    title = document.getElementsByTagName('h2')[0].innerText;
                var html = 'title:\"' + title + '\"$'

                var setText = true;
                var emt = document.getElementById('list2');
                if (emt)
                    html += emt.outerHTML;
                else if (document.getElementsByClassName('flistw').length != 0) {
                    html += document.getElementsByClassName('flistw')[0].outerHTML;
                    setText = false;
                }
                else if (window.__NUXT__) {
                    var pid = window.__NUXT__.data[0].plid;
                    var baseUrl = 'http://open.163.com/newview/movie/free?pid=' + pid + '&mid=';
                    var videoList = window.__NUXT__.data[0].movieInfoList;
                    for (let v in videoList)
                        html += '<td class=\"u-ctitle\">【第' + (parseInt(v) + 1) + '集】<a href=\"' + baseUrl + videoList[v].mid + '\">' + videoList[v].title + '</a>';
                }

                if (setText)
                    document.body.innerText = html;
                else
                    document.body.innerHTML= html;
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="163" crpj="true" watchList="true" delay="500">
        <url><![CDATA[163\.com/movie/\d{4}/\d+/.*/(?<id>[^.]+)\.html?]]></url>
        <title><![CDATA[title:"([^"]+)]]></title>
        <content><![CDATA[(?is)v_title:"(?<title>[^"]+)",thumbnail:"(?<thumbnail>[^"]+)",video_url:"(?<url>[^"]+)",duration:(?<duration>[^;]+)]]></content>
        <jsCode><![CDATA[
            try {
                var title = window.__NUXT__.data[0].title;
                var html = 'title:\"' + title + '\"$'
                if (window.__NUXT__) {
                    var videoList = window.__NUXT__.state.movie.moiveList
                    for (let v in videoList) {
                        var video = videoList[v];
                        html += 'v_title:\"' + video.title + '\",thumbnail:\"' + video.imgPath + '\",video_url:\"' + video.webUrl + '\",duration:' + video.mLength + ';';
                    }
                }

                if (typeof(window.external.receive) != 'undefined')
                    window.external.receive(html);
                else
                    document.body.innerHTML = html;
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="163" crpj="true" delay="500">
        <url><![CDATA[163\.com/news/sub/(?<id>[^.]+)\.html?]]></url>
        <title><![CDATA[title:"([^"]+)]]></title>
        <content><![CDATA[(?is)v_title:"(?<title>[^"]+)",video_url:"(?<url>[^"]+)",thumbnail:"(?<thumbnail>[^"]+)",duration:(?<duration>[^;]+)]]></content>
        <jsCode><![CDATA[
            try {
                //https://c.m.163.com/news/sub/T1573191804274.html?spss=newsapp
                var c = {
                    stringToBytes: function(t) {
                        return e.bin.stringToBytes(unescape(encodeURIComponent(t)))
                    },
                    bytesToString: function(t) {
                        return decodeURIComponent(escape(e.bin.bytesToString(t)))
                    }
                };
                var i = {
                    stringToBytes: function(t) {
                        for (var n = [], e = 0; e < t.length; e++)
                            n.push(255 & t.charCodeAt(e));
                        return n
                    },
                    bytesToString: function(t) {
                        for (var n = [], e = 0; e < t.length; e++)
                            n.push(String.fromCharCode(t[e]));
                        return n.join('')
                    },
                };
                var r = {
                    rotl: function(t, n) {
                        return t << n | t >>> 32 - n
                    },
                    endian: function(t) {
                        if (t.constructor == Number)
                            return 16711935 & r.rotl(t, 8) | 4278255360 & r.rotl(t, 24);
                        for (var n = 0; n < t.length; n++)
                            t[n] = r.endian(t[n]);
                        return t
                    },
                    bytesToWords: function(t) {
                        for (var n = [], e = 0, r = 0; e < t.length; e++,
                        r += 8)
                            n[r >>> 5] |= t[e] << 24 - r % 32;
                        return n
                    },
                    wordsToBytes: function(t) {
                        for (var n = [], e = 0; e < 32 * t.length; e += 8)
                            n.push(t[e >>> 5] >>> 24 - e % 32 & 255);
                        return n
                    },
                    bytesToHex: function(t) {
                        for (var n = [], e = 0; e < t.length; e++)
                            n.push((t[e] >>> 4).toString(16)),
                            n.push((15 & t[e]).toString(16));
                        return n.join('')
                    },
                };
                var a = function(t, n) {
                    t.constructor == String ? t = n && 'binary' === n.encoding ? c.stringToBytes(t) : i.stringToBytes(t) : o(t) ? t = Array.prototype.slice.call(t, 0) : Array.isArray(t) || (t = t.toString());
                    for (var e = r.bytesToWords(t), u = 8 * t.length, s = 1732584193, f = -271733879, l = -1732584194, d = 271733878, h = 0; h < e.length; h++)
                        e[h] = 16711935 & (e[h] << 8 | e[h] >>> 24) | 4278255360 & (e[h] << 24 | e[h] >>> 8);
                    e[u >>> 5] |= 128 << u % 32,
                    e[14 + (64 + u >>> 9 << 4)] = u;
                    var p = a._ff
                        , v = a._gg
                        , g = a._hh
                        , y = a._ii;
                    for (h = 0; h < e.length; h += 16) {
                        var m = s
                            , w = f
                            , b = l
                            , x = d;
                        f = y(f = y(f = y(f = y(f = g(f = g(f = g(f = g(f = v(f = v(f = v(f = v(f = p(f = p(f = p(f = p(f, l = p(l, d = p(d, s = p(s, f, l, d, e[h + 0], 7, -680876936), f, l, e[h + 1], 12, -389564586), s, f, e[h + 2], 17, 606105819), d, s, e[h + 3], 22, -1044525330), l = p(l, d = p(d, s = p(s, f, l, d, e[h + 4], 7, -176418897), f, l, e[h + 5], 12, 1200080426), s, f, e[h + 6], 17, -1473231341), d, s, e[h + 7], 22, -45705983), l = p(l, d = p(d, s = p(s, f, l, d, e[h + 8], 7, 1770035416), f, l, e[h + 9], 12, -1958414417), s, f, e[h + 10], 17, -42063), d, s, e[h + 11], 22, -1990404162), l = p(l, d = p(d, s = p(s, f, l, d, e[h + 12], 7, 1804603682), f, l, e[h + 13], 12, -40341101), s, f, e[h + 14], 17, -1502002290), d, s, e[h + 15], 22, 1236535329), l = v(l, d = v(d, s = v(s, f, l, d, e[h + 1], 5, -165796510), f, l, e[h + 6], 9, -1069501632), s, f, e[h + 11], 14, 643717713), d, s, e[h + 0], 20, -373897302), l = v(l, d = v(d, s = v(s, f, l, d, e[h + 5], 5, -701558691), f, l, e[h + 10], 9, 38016083), s, f, e[h + 15], 14, -660478335), d, s, e[h + 4], 20, -405537848), l = v(l, d = v(d, s = v(s, f, l, d, e[h + 9], 5, 568446438), f, l, e[h + 14], 9, -1019803690), s, f, e[h + 3], 14, -187363961), d, s, e[h + 8], 20, 1163531501), l = v(l, d = v(d, s = v(s, f, l, d, e[h + 13], 5, -1444681467), f, l, e[h + 2], 9, -51403784), s, f, e[h + 7], 14, 1735328473), d, s, e[h + 12], 20, -1926607734), l = g(l, d = g(d, s = g(s, f, l, d, e[h + 5], 4, -378558), f, l, e[h + 8], 11, -2022574463), s, f, e[h + 11], 16, 1839030562), d, s, e[h + 14], 23, -35309556), l = g(l, d = g(d, s = g(s, f, l, d, e[h + 1], 4, -1530992060), f, l, e[h + 4], 11, 1272893353), s, f, e[h + 7], 16, -155497632), d, s, e[h + 10], 23, -1094730640), l = g(l, d = g(d, s = g(s, f, l, d, e[h + 13], 4, 681279174), f, l, e[h + 0], 11, -358537222), s, f, e[h + 3], 16, -722521979), d, s, e[h + 6], 23, 76029189), l = g(l, d = g(d, s = g(s, f, l, d, e[h + 9], 4, -640364487), f, l, e[h + 12], 11, -421815835), s, f, e[h + 15], 16, 530742520), d, s, e[h + 2], 23, -995338651), l = y(l, d = y(d, s = y(s, f, l, d, e[h + 0], 6, -198630844), f, l, e[h + 7], 10, 1126891415), s, f, e[h + 14], 15, -1416354905), d, s, e[h + 5], 21, -57434055), l = y(l, d = y(d, s = y(s, f, l, d, e[h + 12], 6, 1700485571), f, l, e[h + 3], 10, -1894986606), s, f, e[h + 10], 15, -1051523), d, s, e[h + 1], 21, -2054922799), l = y(l, d = y(d, s = y(s, f, l, d, e[h + 8], 6, 1873313359), f, l, e[h + 15], 10, -30611744), s, f, e[h + 6], 15, -1560198380), d, s, e[h + 13], 21, 1309151649), l = y(l, d = y(d, s = y(s, f, l, d, e[h + 4], 6, -145523070), f, l, e[h + 11], 10, -1120210379), s, f, e[h + 2], 15, 718787259), d, s, e[h + 9], 21, -343485551),
                        s = s + m >>> 0,
                        f = f + w >>> 0,
                        l = l + b >>> 0,
                        d = d + x >>> 0
                    }
                    return r.endian([s, f, l, d])
                };
                a._ff = function(t, n, e, r, i, o, c) {
                    var a = t + (n & e | ~n & r) + (i >>> 0) + c;
                    return (a << o | a >>> 32 - o) + n
                },
                a._gg = function(t, n, e, r, i, o, c) {
                    var a = t + (n & r | e & ~r) + (i >>> 0) + c;
                    return (a << o | a >>> 32 - o) + n
                },
                a._hh = function(t, n, e, r, i, o, c) {
                    var a = t + (n ^ e ^ r) + (i >>> 0) + c;
                    return (a << o | a >>> 32 - o) + n
                },
                a._ii = function(t, n, e, r, i, o, c) {
                    var a = t + (e ^ (n | ~r)) + (i >>> 0) + c;
                    return (a << o | a >>> 32 - o) + n
                };

                //https://www.acfun.cn/bangumi/aa6000986_36188_1714862
                var title = (document.getElementsByTagName('h3').length != 0) ? document.getElementsByTagName('h3')[0].innerText : window.pageInfo.title;
                var uid = window.location.href.match(/sub\/([^\.]+)/)[1];

                var api_url = 'https://c.m.163.com/nc/subscribe/list/' + uid + '/video/';
                var html = 'title:\"' + title + '\"$';
                var p = 0;
                while (true) {
                    var c = Date.now();
                    var t = uid + 'video' + p + '20' + c;
                    var e = r.bytesToHex(r.wordsToBytes(a(t)));
                    var data = window.external.getHtmlCode(api_url + p + '-20.html?w=' + c + '&sign=' + e, window.location.href);
                    if (data.indexOf('tab_list\":[{') == -1)
                        break;

                    var jo = JSON.parse(data);
                    for (var n = 0; n <= jo.tab_list.length - 1; n++) {
                        var v = jo.tab_list[n].videoinfo;
                        html += 'v_title:\"' + v.title + '\",video_url:\"' + (v.m3u8Hd_url || v.mp4Hd_url) + '\",thumbnail:\"' + v.cover + '\",duration:' + v.video_data.duration + ';\r\n';
                    }
                    //0..21..41..
                    if (p == 0)
                        p++
                    p += 20;
                    window.external.doEvents();
                }

                if (typeof(window.external.receive) != 'undefined')
                    window.external.receive(html);
                else
                    document.body.innerHTML = html;
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="qq">
        <url><![CDATA[qq\.com/vplus/(?<id>\w+)]]></url>
        <title><![CDATA[title:"([^"]+)]]></title>
        <content><![CDATA[(?is)vid":"(?<url>[^"]+).*?duration":"(?<duration>[^"]+).*?pic_640x360":"(?<thumbnail>[^"]+).*?title":"(?<title>[^"]+)]]></content>
        <baseUrl><![CDATA[http://v.qq.com/x/page/]]></baseUrl>
        <jsCode><![CDATA[
            try {
                //http://v.qq.com/vplus/342318567
                var title = USER_INFO.name;
                var url = 'http://access.video.qq.com/pc_client/GetUserVidListPage?vappid=50662744&vsecret=64b037e091deae75d3840dbc5d565c58abe9ea733743bbaf&stUserId=' + USER_INFO.number + '&page_size=20&page_index=';
                var p = 1;
                var html = 'title:\"' + title + '\"$';
                while (true) {
                    var data = window.external.getHtmlCode(url + p);
                    data = data.replace(/\",\"map/g, '.html?\",\"map');
                    if (data.indexOf('\"iErrCode\":0') == -1)
                        break;

                    html += data;
                    p++;
                    window.external.doEvents();
                }

                if (typeof(window.external.receive) != 'undefined')
                    window.external.receive(html);
                else {
                    document.head.innerHTML = '';
                    document.body.innerHTML = html;
                }
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="qq">
        <url><![CDATA[qq\.com/[^/]+/videoplus(?:.*?vuid=(?<id>[^#]+)|/(?<id>[^/]+))]]></url>
        <title><![CDATA[title:"([^"]+)]]></title>
        <content><![CDATA[(?is)v_title:"(?<title>[^"]+)",video_url:"(?<url>[^"]+)",duration:(?<duration>[^;]+)]]></content>
        <baseUrl><![CDATA[http://v.qq.com/x/page/]]></baseUrl>
        <total><![CDATA[total:([^,]+)]]></total>
        <startPage><![CDATA[startPage:([^,]+)]]></startPage>
        <hasMore><![CDATA[hasMore:([^,]+)]]></hasMore>
        <jsCode><![CDATA[
            try {
                //https://v.qq.com/biu/videoplus?vuid=1486798423
                //http://v.qq.com/s/videoplus/406792155
                var title = document.getElementsByClassName('top_title').length != 0? document.getElementsByClassName('top_title')[0].innerText : document.title;
                vuid = document.body.innerHTML.match(/vuid=\"([^\"]+)/)[1];
                var base_url= 'https://nodeyun.video.qq.com/x/api/videoplus/data?callback=&type=video&vuid=' + vuid;
                var html = 'title:\"' + title + '\"$';
                var p = parseInt(window.external.sp) || 0;
                var pmax = (window.external.sp != undefined) ? 49 : 99;
                var args = '&last_vid_position=' + p*10 + '&offset=' + p*10 + '&index_context=score&_=' + Date.now();
                var pidx = 0;
                var total = 0;
                var hasMore = false;
                while (true) {
                    if (pidx > pmax)
                        break;

                    var data = window.external.getHtmlCode(base_url + args);
                    var jo = JSON.parse(data);
                    if (jo.body && jo.body.has_next_page && jo.body.modules.length != 0 && jo.body.modules[0].sections.length != 0) {
                        var blocks = jo.body.modules[0].sections[0].block_list.blocks;
                        for (let i = 0; i <= blocks.length - 1; i++) {
                            try {
                                var v = blocks[i].data;
                                html += 'v_title:\"' + v.title + '\",video_url:\"' + v.vid + '.html\",duration:' + blocks[i].mark_label_list_map['0'].mark_label_list[0].prime_text + ';\r\n';
                            }
                            catch (ex) {
                                continue;
                            }
                        }
                    }
                    if (!jo.body || !jo.body.has_next_page) {
                        if (jo.body && !jo.body.has_next_page)
                            hasMore = false;
                        break;
                    }

                    var pc = jo.body.page_context;
                    args = '&last_vid_position=' + pc.last_vid_position + '&offset=' + pc.offset + '&index_context=' + encodeURIComponent(pc.index_context) + '&_=' + Date.now();
                    p++;
                    pidx++;
                    hasMore = true;
                    window.external.doEvents();
                }

                html = 'total:' + total + ',startPage:' + p + ',hasMore:' + hasMore + ',' + html;
                if (typeof(window.external.receive) != 'undefined')
                    window.external.receive(html);
                else {
                    document.head.innerHTML = '';
                    document.body.innerHTML = html;
                }
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="qq">
        <url><![CDATA[qq\.com/.*?home\?vcuid=(?<id>\d+)]]></url>
        <title><![CDATA[title:"([^"]+)]]></title>
        <content><![CDATA[(?is)v_title:"(?<title>[^"]+)",video_url:"(?<url>[^"]+)",duration:(?<duration>[^,]+),date:(?<date>[^;]+)]]></content>
        <baseUrl><![CDATA[http://v.qq.com/x/page/]]></baseUrl>
        <total><![CDATA[total:([^,]+)]]></total>
        <startPage><![CDATA[startPage:([^,]+)]]></startPage>
        <hasMore><![CDATA[hasMore:([^,]+)]]></hasMore>
        <jsCode><![CDATA[
            try {
                //https://v.qq.com/biu/creator/home?vcuid=9000020171
                var title = document.getElementsByTagName('h3').length != 0? document.getElementsByTagName('h3')[0].innerText : document.title;
                var vcuid = window.external.url.match(/vcuid=(\d+)/)[1];
                var base_url= 'https://pbaccess.video.qq.com/trpc.creator_center.header_page.personal_page/GetUserVideoList?vcuid=' + vcuid + '&page_size=30&list_type=1&page=';
                var html = 'title:\"' + title + '\"$';
                var p = parseInt(window.external.sp) || 0;
                if (p == 0)
                    p = 1;
                var pmax = (window.external.sp != undefined) ? 49 : 99;
                var pidx = 0;
                var total = 0;
                var hasMore = false;
                while (true) {
                    if (pidx > pmax)
                        break;
                    var data = window.external.getHtmlCode(base_url + p, window.external.url);
                    if (data.indexOf('\"list\":[]') != -1) {
                        hasMore = false;
                        break;
                    }

                    var jo = JSON.parse(data);
                    var items = jo.data.data.list
                    for (let i = 0; i <= items.length - 1; i++) {
                        var v = items[i];
                        html += 'v_title:\"' + v.title + '\",video_url:\"' + v.vid + '.html\",duration:' + v.duration + ',date:' + v.upload_time + ';\r\n';
                    }

                    p++;
                    pidx++;
                    hasMore = true;
                    window.external.doEvents();
                }

                html = 'total:' + total + ',startPage:' + p + ',hasMore:' + hasMore + ',' + html;
                if (typeof(window.external.receive) != 'undefined')
                    window.external.receive(html);
                else {
                    document.head.innerHTML = '';
                    document.body.innerHTML = html;
                }
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="qq" crpj="true">
        <url><![CDATA[qq\.com/detail/\w/(?<id>\w+)\.html?]]></url>
        <title><![CDATA[title:"([^"]+)]]></title>
        <content><![CDATA[(?is)pic":"(?<thumbnail>[^"]*).*?playUrl":"(?:.*?url=)?(?<url>[^"]+).*?title":"(?<title>[^"]+)]]></content>
        <jsCode><![CDATA[
            try {
                var title = document.body.innerHTML.match(/info:title\">([^<]+)<\/a>/)[1];
                var id = window.external.url.match(/\/(\w+)\.html?/)[1];
                var html = 'title:\"' + title + '\"$';
                //normal
                //https://v.qq.com/detail/m/m441e3rjq9kwpsc.html
                //https://v.qq.com/detail/s/sdp001uffzr2rjq.html from iqiyi，因此plname=空可解，非是=qq，其url为https://v.qq.com/search_redirect.html?url=https://www.iqiyi.com/v_19rrh4ohvw.html?vfm=m_103_txsp此类
                if (document.getElementsByClassName('slt_list').length == 0) {
                    var api_url = 'https://s.video.qq.com/get_playsource?id=' + id + '&plat=2&type=4&data_type=2&video_type=9&range=1-9999&plname=&otype=json&num_mod_cnt=20&callback=_jsonp&_t=' + Date.now();
                    html += window.external.getHtmlCode(api_url, window.external.url);
                }
                //year & month
                else {
                    var years = document.getElementsByClassName('slt_list')[0].innerText.split('\n').filter(function(item) { return item.trim() != ''});
                    var base_url = 'https://s.video.qq.com/get_playsource?id=' + id + '&plat=2&type=4&data_type=3&video_type=10&plname=&otype=json&callback=_jsonp&_t=' + Date.now();
                    for (let i = 0; i <= years.length - 1; i++) {
                        var y = years[i].trim();
                        for (let m = 12; m >= 1; m--) {
                            var api_url = base_url + '&year=' + y + '&month=' + m;
                            var data = window.external.getHtmlCode(api_url, window.external.url);
                            if (data.indexOf('PlaylistItem\":{') != -1)
                                html += data;
                            window.external.doEvents();
                        }
                    }
                }

                document.getElementsByTagName('html')[0].innerHTML = html;
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="qq" watchList="true" updateTitle="true" crpj="true">
        <url><![CDATA[qq\.com/\w/cover/(?<id>\w+)/\w+\.html?]]></url>
        <title><![CDATA[title:"([^"]+)]]></title>
        <content><![CDATA[(?is)(?:<span\s+class=".*?item.*?href="(?<url>[^"]+).*?>(?<title>[^<]+)|<li.*?title="(?<title>[^"]+).*?href="(?<url>[^"]+))]]></content>
        <baseUrl><![CDATA[http://v.qq.com]]></baseUrl>
        <jsCode><![CDATA[
            try {
                //https://v.qq.com/x/cover/mzc00200k12f5gi/s0033w5isu7.html
                var title = window.COVER_INFO.title;
                var html = 'title:\"' + title + '\"$';
                if (document.getElementsByClassName('episode_filter_items __episode_items').length != 0) {
                    var jl = document.getElementsByClassName('episode_filter_items __episode_items')[0];
                    for (var i = 0; i <= jl.childElementCount - 1; i++) {
                        child = jl.children[i];
                        child.click();
                        //delay
                        var completed = false;
                        setTimeout(function () {
                            completed = true;
                        }, 500);
                        while (!completed)
                            window.external.doEvents();
                        html += document.getElementsByClassName('mod_episode')[0].innerHTML;
                    }
                }
                else if (document.getElementsByClassName('mod_episode').length != 0)
                    html += document.getElementsByClassName('mod_episode')[0].innerHTML;
                else if (document.getElementsByClassName('figure_list').length != 0)
                    html += document.getElementsByClassName('figure_list')[0].innerHTML;

                if (typeof(window.external.receive) != 'undefined')
                    window.external.receive(html);
                else
                    document.body.innerHTML = html;
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="qq" crpj="true">
        <url><![CDATA[qq\.com/portal/(?:mv_lib\.html?|.*?t=mv)]]></url>
        <title><![CDATA[<title>(.+?)</title>]]></title>
        <content><![CDATA[(?is)<li\s+class="mv_list__item".*?<img.*?src="//(?<thumbnail>[^"]+).*?<a\s+title="(?<title>[^"]+).*?href="(?<url>[^"]+)]]></content>
    </item>
    <item domain="qq" crpj="true">
        <url><![CDATA[qq\.com/\w+/yqq/(?:album|singer|playlist)/(?<id>[^.]+)\.html?]]></url>
        <title><![CDATA[title:"([^"]+)]]></title>
        <content><![CDATA[(?is)<li.*?a[^>]+class="js_song[^>]+href="(?<url>[^"]+).*?>(?<title>[^<]+).*?songlist__time">(?<duration>[^<]+)</div>.*?</li>]]></content>
        <jsCode><![CDATA[
            try {
                var title = document.getElementsByTagName('h1').length > 1 ? document.getElementsByTagName('h1')[1].innerText : document.title;
                var html = 'title:\"' + title + '\"$' + document.getElementsByClassName('songlist__list')[0].innerHTML;

                if (typeof(window.external.receive) != 'undefined')
                    window.external.receive(html);
                else
                    document.body.innerHTML = html;
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="qq">
        <url><![CDATA[qq\.com/\w+/person\.html\?userid=(?<id>[^&]+)]]></url>
        <title><![CDATA[person-name">([^<]+)</div>]]></title>
        <content><![CDATA[(?is)tvBoard".*?imageUrl":"(?<thumbnail>[^"]+).*?vid":"(?<url>[^"]+).*?title":"(?<title>[^"]+).*?duration":(?<duration>[^}]+)]]></content>
        <baseUrl><![CDATA[base_url=([^$]+)]]></baseUrl>
        <jsCode><![CDATA[
            try {
                var uid = window.location.href.match(/userid=([^&]+)/)[1];
                var base_url = 'https://huoguo.qq.com/m/video.html?userid=' + uid + '&id=';
                var api_url = 'https://hgaccess.video.qq.com/huoguo/user_work_list?vappid=49109510&vsecret=c1202d7f3ba41f86cdd2d3d1082605b4ed764c21e29520f3&callback=func&raw=1';
                var pc = '\"\"';
                var html = 'base_url=' + base_url + '$';
                while (true) {
                    var args = '{\"account\":{\"id\":\"' + uid + '\",\"type\":50},\"pageContext\":' + pc + ',\"countReg\":true}';
                    var data = window.external.getPostResultEx(api_url, args);
                    data = data.replace('\"offset\"', '\\\"offset\\\"');
                    data = data.replace('\"page_size\"', '\\\"page_size\\\"');
                    data = data.replace('\"time\"', '\\\"time\\\"');
                    data = data.replace('\"last_node_id\":\"', '\\\"last_node_id\\\":\\\"');
                    data = data.replace('\",\"last_node_score\"', '\\\",\\\"last_node_score\\\"');
                    data = data.replace('\"top_vid_set\"', '\\\"top_vid_set\\\"');
                    var jo = JSON.parse(data);
                    html += JSON.stringify(jo.data.collections);
                    if (!jo.data.hasNextPage)
                        break;

                    pc = JSON.stringify(jo.data.pageContext);
                    window.external.doEvents();
                }

                if (typeof(window.external.receive) != 'undefined')
                    window.external.receive(html);
                else {
                    document.head.innerHTML = '';
                    document.body.innerHTML = html;
                }
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="qq">
        <url><![CDATA[qq\.com/course/(?<id>\d+)(?:\?q.*?)?$]]></url>
        <title><![CDATA[<h4[^>]+>([^<]+)</h4>]]></title>
        <content><![CDATA[(?is)<li\s+class="js-task.*?(?<url>\?taid=\d+).*?text">(?<title>[^<]+)</h5>]]></content>
        <baseUrl><![CDATA[^.*?/course/\d+]]></baseUrl>
        <jsCode><![CDATA[
            try {
                var html = document.getElementById('js-study-task-list').innerHTML;
                html = html.replace(/taid=\"/g, '?taid=');
                document.body.innerText = html;
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="qq" watchList="true">
        <url><![CDATA[qq\.com/course/(?<id>\d+)\?taid=\d+]]></url>
        <title><![CDATA[<h4[^>]+>([^<]+)</h4>]]></title>
        <content><![CDATA[(?is)<li\s+class="js-task.*?(?<url>taid=\d+).*?text">(?<title>[^<]+)</h5>]]></content>
        <baseUrl><![CDATA[^.*?/course/\d+\?]]></baseUrl>
    </item>
    <item domain="qq" crpj="true">
        <url><![CDATA[qq\.com/\w+/search.*?q=([^&]+)]]></url>
        <title><![CDATA[<title>([^-]+)-腾讯视频</title>]]></title>
        <content><![CDATA[(?is)<div\s+class="result_item.*?href="(?<url>[^"]+).*?figure_info">(?<duration>[^<]+).*?title_txt=(?<title>[^"]+)]]></content>
    </item>
    <item domain="qq">
        <url><![CDATA[qq\.com/usershare.*?id=(?<id>[^&]+)]]></url>
        <title><![CDATA[title:"([^"]+)]]></title>
        <content><![CDATA[(?is)"name":"(?<title>[^"]+).*?image":"(?<thumbnail>[^"]+).*?runTime":(?<duration>[^,]+).*?url":"(?<url>[^"]+)]]></content>
        <jsCode><![CDATA[
            try {
                //https://usercenter.html5.qq.com/usershare?type=9&id=qeh_8995416&tabType=1
                var title = window._renderData_.userCenter.userHeaderData.toUserInfo.sNickName;
                var uid = window._renderData_.userCenter.userId
                var type = window._renderData_.userCenter.accountType;
                var args = 'userId=' + uid + '&accountType=' + type + '&feedType=0'
                var p = 0;
                var t = 0;
                var html = 'title:\"' + title + '\"$';
                while (true) {
                    var data = window.external.getPostResult('https://quan.qq.com/node/api2/getHomePageFeed', args + '&start=' + p + '&lastTime=' + t, 'application/x-www-form-urlencoded', window.location.href);
                    var jo = JSON.parse(data);
                    var videos = jo.data.vHomePageFeed;
                    for (let i = 0; i <= videos.length - 1; i++) {
                        var video = videos[i];
                        html += JSON.stringify(video.stPostSummary.postField.video);
                        if (i == videos.length - 1)
                            t = video.stPostSummary.time;
                    }
                    if (jo.data.isEnd || videos.length == 0)
                        break;

                    p += videos.length;
                    window.external.doEvents();
                }

                if (typeof(window.external.receive) != 'undefined')
                    window.external.receive(html);
                else {
                    document.head.innerHTML = '';
                    document.body.innerHTML = html;
                }
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="qq">
        <url><![CDATA[weishi\.qq\.com/weishi/personal/(?<id>[^/]+)]]></url>
        <title><![CDATA[title:"([^"]+)]]></title>
        <content><![CDATA[(?is)v_title:"(?<title>[^"]+)",duration:(?<duration>[^,]+),video_url:(?<url>[^,]+),date:(?<date>[^;]+)]]></content>
        <jsCode><![CDATA[
            try {
                //https://h5.weishi.qq.com/weishi/personal/1524501680277894/wspersonal?_wv=1&id=1524501680277894
                var pid = window.location.href.match(/personal\/([^/]+)/)[1];
                var attach_info = '';
                var args = 'type=1&person_id=' + pid + '&format=json&attach_info=';
                var api_url = 'https://h5.weishi.qq.com/webapp/json/weishi/WSGetPersonalPage?';
                var title = '';
                var html = '';
                while (true) {
                    var data = window.external.getHtmlCodeEx(api_url + args + attach_info);
                    var jo = JSON.parse(data);
                    if (!title)
                        title = jo.data.profile.person.nick;
                    var feeds = jo.data.feeds;
                    for (let i = 0; i <= feeds.length - 1; i++) {
                        var feed = feeds[i];
                        var video_url = 'https://h5.weishi.qq.com/weishi/feed/' + feed.id + '/wsfeed?wxplay=1&id=' + feed.id;
                        html += 'v_title:\"' + feed.feed_desc + '\",duration:' + (feed.video.duration / 1000) + ',video_url:' + video_url + ',date:' + feed.createtime + ';\r\n';
                    }
                    if (jo.data.is_finished)
                        break;

                    attach_info = encodeURIComponent(jo.data.attach_info);
                    window.external.doEvents();
                }

                html = 'title:\"' + title + '\"$' + html;
                if (typeof(window.external.receive) != 'undefined')
                    window.external.receive(html);
                else {
                    document.head.innerHTML = '';
                    document.body.innerHTML = html;
                }
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <!--https://mp.weixin.qq.com/s/H2cSGJUElAh2GXNnavlWhA, https://mp.weixin.qq.com/s/X2eu-Ddg_q76GCkh2kIq6g, https://mp.weixin.qq.com/s/pvUnidHNF2yFgKQKJm1lIg(单个)-->
    <item domain="qq" watchList="true">
        <url><![CDATA[weixin\.qq\.com/\w+/(?<id>[^/]+)]]></url>
        <title><![CDATA[<h2[^>]+>([^<]+)</h2>]]></title>
        <content><![CDATA[<p[^>]*>(?<title>[^<]+).*?<p>(?:</p><p>)?<iframe.*?cover="(?<thumbnail>[^"]+).*?src="(?<url>[^"]+)"></iframe>]]></content>
    </item>
    <item domain="twitter">
        <url><![CDATA[(?:twitter\.com/\w+/media$|twitter\.com/(?<id>\w+)$)]]></url>
        <title><![CDATA[<title>(.+?)</title>]]></title>
        <content><![CDATA[(?is)href="(?<url>[^"]+)"\s+class="twitter-timeline-link u-hidden"\s+data-pre-embedded="true"\s+dir="ltr" >[^<]+</a></p>\s+</div>\s+<div class="AdaptiveMediaOuterContainer">\s+<div class="AdaptiveMedia\s+is-video.*?background-image:url\('(?<thumbnail>[^']+)']]></content>
    </item>
    <item domain="youku" crpj="true">
        <url><![CDATA[youku\.com/(?:\w/|profile\?uid=)(?<id>[^/&]+)]]></url>
        <title><![CDATA[title:"([^"]+)]]></title>
        <content><![CDATA[(?is)<div\s+class="v-thumb.*?img\s+src="(?<thumbnail>[^"]+).*?<a[^>]+href="(?<url>[^"]+)[^>]+title="(?<title>[^"]+).*?v-time">(?<duration>[^<]+).*?<a[^>]+href="(?<burl>[^"]+)]]></content>
        <total><![CDATA[total:([^,]+)]]></total>
        <startPage><![CDATA[startPage:([^,]+)]]></startPage>
        <hasMore><![CDATA[hasMore:([^,]+)]]></hasMore>
        <jsCode><![CDATA[
            try {
                //http://i.youku.com/u/UODI1MDA0NzgzNg==
                //https://i.youku.com/i/UNTU5Njc3MTA5Ng==/videos?spm=a2hzp.8244740.0.0
                //https://m.youku.com/profile?uid=UODI1MDA0NzgzNg==&callApp=1&callVideo=true&sharekey=32b0698a249bc5e6556f5b77d30bea885&qq-pf-to=pcqq.group
                //为避免优酷反扒导致页面解析取不到缩略图，这里的是小缩略图，用它
                var title = (document.getElementsByClassName('username').length != 0) ? document.getElementsByClassName('username')[0].innerText + ' - 视频' : document.title;
                var html = '';
                var href = window.location.href;
                if (href.indexOf('page=') == -1) {
                    //主页或移动设备分享页
                    if (href.indexOf('videos') == -1 && href.indexOf('navcustom') == -1 && href.indexOf('playlists') == -1) {
                        var uid = href.indexOf('uid=') != -1 ? href.match(/uid=([^&]+)/)[1] : href.match(/\/\w\/([^?\/]+)/)[1];
                        href = 'https://i.youku.com/i/' + uid + '/videos?';
                    }

                    var p = parseInt(window.external.sp) || 1;
                    var pmax = (window.external.sp != undefined) ? 19 : 99;
                    var pidx = 0;
                    var total = (document.getElementsByClassName('title').length != 0) ? document.getElementsByClassName('title')[0].innerHTML.match(/<span>\(([^\)]+)/)[1] : 0;
                    var hasMore = false;
                    while (true) {
                        if (pidx > pmax) {
                            hasMore = true;
                            break;
                        }

                        var page = (href.indexOf('?') != -1) ? '&page=' : '?page=';
                        var api_url = href + page + p;
                        var data = window.external.getHtmlCode(api_url, href, true, 200);
                        if (data.indexOf('YK-null') != -1)
                            break;

                        html += '$' + data;
                        p++;
                        pidx++;
                        window.external.doEvents();
                    }
                    html = 'total:' + total + ',startPage:' + p + ',hasMore:' + hasMore + ',' + html;
                }
                else {
                    title += ' p' + href.match(/page=(\d+)/)[1];
                    //为正则匹配统一计，重取源码
                    html = window.external.getHtmlCode(href);
                }

                html = 'title:\"' + title + '\"$' + html;
                //私密视频没有时长，以0补之
                html = html.replace(/v-meta-title\">/g, 'v-meta-title\">00:00');
                if (typeof(window.external.receive) != 'undefined')
                    window.external.receive(html);
                else {
                    document.head.innerHTML = '';
                    document.body.innerHTML = html;
                }
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="youku" crpj="true">
        <url><![CDATA[youku\.com/show/(?<id>[^\.]+)\.html?]]></url>
        <title><![CDATA[title:"([^"]+)]]></title>
        <content><![CDATA[(?is)p-thumb"><a\s+title="(?<title>[^"]+)"\s+href="//(?<url>[^"]+).*?<img[^>]+src="(?<thumbnail>[^"]+).*?<span>(?<duration>[^<]+)</span>]]></content>
        <jsCode><![CDATA[
            try {
                //https://list.youku.com/show/id_zbd438d506a4911e4b522.html
                //https://list.youku.com/show/id_z5eefbfbd40db817a11ef.html?qq-pf-to=pcqq.c2c
                var title = document.body.innerHTML.match(/<\/a>：([^<]+)/)[1];
                var html = 'title:\"' + title + '\"$';
                var showid = PageConfig.showid;
                var api_url = 'https://list.youku.com/show/module?id=' + showid + '&tab=showInfo&callback=jq&_=' + Date.now();
                var data = window.external.getHtmlCode(api_url);
                data = data.substring('window.jq && jq('.length, data.length - 2);
                data = JSON.stringify(JSON.parse(data));
                var matchs = document.body.innerHTML.match(/reload_[^\"]+/g);
                for (let i = 0; i <= matchs.length - 1; i++) {
                    var reload = matchs[i];
                    api_url = 'https://list.youku.com/show/point?id=' + showid + '&callback=jq&stage=' + reload + '&_=' + Date.now();
                    data = window.external.getHtmlCode(api_url);
                    data = data.substring('window.jq && jq('.length, data.length - 2);
                    data = JSON.stringify(JSON.parse(data));
                    data = data.replace(/\\\\\"/g, '\"');
                    html += data;
                    window.external.doEvents();
                }

                document.getElementsByTagName('html')[0].innerHTML = html;
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="youku" crpj="true">
        <url><![CDATA[youku\.com/v_nextstage/(?<id>[^\.]+)\.html?]]></url>
        <title><![CDATA[title:"([^"]+)]]></title>
        <content><![CDATA[(?is)<(?:a|div)\s+title="(?<title>[^"]+).*?href="(?<url>[^"]+).*?</a>]]></content>
        <jsCode><![CDATA[
            try {
                var title = document.getElementsByClassName('title-link ellipsis-style').length != 0 ? document.getElementsByClassName('title-link ellipsis-style')[0].innerText : document.head.innerHTML.match(/<meta\s+name=\"irAlbumName\"\s+content=\"([^\"]+)\"/)[1];
                var html = 'title:\"' + title + '\"$';
                //https://v.youku.com/v_nextstage/id_efbfbd66efbfbd365eef.html?spm=a2h0c.8166622.PhoneSokuProgram_1.dtitle
                //https://v.youku.com/v_nextstage/id_deea83b06b3f42ed8255.html?spm=a2h0c.8166622.PhoneSokuProgram_1.dtitle
                var tw = undefined;
                if (document.getElementsByClassName('top-wrap').length != 0)
                    tw = document.getElementsByClassName('top-wrap')[0];
                if (!tw && document.getElementsByClassName('top-manu-wrap').length != 0)
                    tw = document.getElementsByClassName('top-manu-wrap')[0];
                if (tw) {
                    for (let i = 0; i <= tw.childElementCount - 1; i++) {
                        var child = tw.children[i];
                        if (child.innerText == '更多视频')
                            break;

                        child.click();
                        //delay
                        var completed = false;
                        setTimeout(function () {
                            completed = true;
                        }, 1000);
                        while (!completed)
                            window.external.doEvents();

                        html += document.getElementsByClassName('anthology-content')[0].innerHTML;
                    }
                    tw = tw.nextElementSibling;
                    if (tw) {
                        for (let i = 0; i <= tw.childElementCount - 1; i++) {
                            child = tw.children[i];
                            child.click();
                            //delay
                            var completed = false;
                            setTimeout(function () {
                                completed = true;
                            }, 1000);
                            while (!completed)
                                window.external.doEvents();

                            html += document.getElementsByClassName('anthology-content')[0].innerHTML;
                        }
                    }
                }
                //https://v.youku.com/v_show/id_XMzA0MjIzMTQ4.html?spm=a2hbt.13141534.app.5~5!2~5!2~5~5~5!2~5~5!2~5!2~5!2~5~A!2&s=cc006aec962411de83b1
                //https://v.youku.com/v_show/id_XMjgyODc0OTE2OA==.html?spm=a2hbt.13141534.1_3.d_1_5&s=0f0c7e5efd0b11e4b5ce
                else if (document.getElementsByClassName('anthology-content').length != 0) {
                    for (var i = 0; i <= document.getElementsByClassName('anthology-content').length - 1; i++) {
                        var ac = document.getElementsByClassName('anthology-content')[i];
                        if (ac.innerHTML) {
                            html += ac.innerHTML;
                            break;
                        }
                    }
                }

                if (typeof(window.external.receive) != 'undefined')
                    window.external.receive(html);
                else
                    document.body.innerHTML = html;
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="youku" watchList="true" crpj="true">
        <url><![CDATA[youku\.com/v_show/id_.*?\.html?.*(?<!f=\d+&)s=(?<id>.*?)$]]></url>
        <title><![CDATA[title:"([^"]+)]]></title>
        <content><![CDATA[(?is)<(?:a|div)\s+title="(?<title>[^"]+).*?href="(?<url>[^"]+).*?</a>]]></content>
        <jsCode><![CDATA[
            try {
                var title = document.getElementsByClassName('title-link ellipsis-style').length != 0 ? document.getElementsByClassName('title-link ellipsis-style')[0].innerText : document.head.innerHTML.match(/<meta\s+name=\"irAlbumName\"\s+content=\"([^\"]+)\"/)[1];
                var html = 'title:\"' + title + '\"$';
                var tw = undefined;
                if (document.getElementsByClassName('top-wrap').length != 0)
                    tw = document.getElementsByClassName('top-wrap')[0];
                if (!tw && document.getElementsByClassName('top-manu-wrap').length != 0)
                    tw = document.getElementsByClassName('top-manu-wrap')[0];
                if (tw) {
                    for (let i = 0; i <= tw.childElementCount - 1; i++) {
                        var child = tw.children[i];
                        if (child.innerText == '更多视频')
                            break;

                        child.click();
                        //delay
                        var completed = false;
                        setTimeout(function () {
                            completed = true;
                        }, 1000);
                        while (!completed)
                            window.external.doEvents();

                        html += document.getElementsByClassName('anthology-content')[0].innerHTML;
                    }
                    tw = tw.nextElementSibling;
                    if (tw) {
                        for (let i = 0; i <= tw.childElementCount - 1; i++) {
                            child = tw.children[i];
                            child.click();
                            //delay
                            var completed = false;
                            setTimeout(function () {
                                completed = true;
                            }, 1000);
                            while (!completed)
                                window.external.doEvents();

                            html += document.getElementsByClassName('anthology-content')[0].innerHTML;
                        }
                    }
                }
                //https://v.youku.com/v_show/id_XMzA0MjIzMTQ4.html?spm=a2hbt.13141534.app.5~5!2~5!2~5~5~5!2~5~5!2~5!2~5!2~5~A!2&s=cc006aec962411de83b1
                //https://v.youku.com/v_show/id_XMjgyODc0OTE2OA==.html?spm=a2hbt.13141534.1_3.d_1_5&s=0f0c7e5efd0b11e4b5ce
                else if (document.getElementsByClassName('anthology-content').length != 0) {
                    for (var i = 0; i <= document.getElementsByClassName('anthology-content').length - 1; i++) {
                        var ac = document.getElementsByClassName('anthology-content')[i];
                        if (ac.innerHTML) {
                            html += ac.innerHTML;
                            break;
                        }
                    }
                }

                if (typeof(window.external.receive) != 'undefined')
                    window.external.receive(html);
                else
                    document.body.innerHTML = html;
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="youku" crpj="true">
        <url><![CDATA[youku\.com/albumlist/show[?/]id[=_](?<id>[^&.]+)]]></url>
        <title><![CDATA[title:"([^"]+)]]></title>
        <content><![CDATA[(?is)<div.*?<a\s+title="(?<title>[^"]+)"\s+href="(?<url>[^"]+).*?<span>(?<duration>[^<]+)]]></content>
        <jsCode><![CDATA[
            try {
                var title = (document.getElementsByClassName('pl-title').length != 0) ? document.getElementsByClassName('pl-title')[0].innerText : document.title;
                var id = document.body.innerHTML.match(/data-id=\"([^\"]+)/)[1];
                var asc = document.body.innerHTML.match(/data-ascending=\"([^\"]+)/)[1];
                var api_url = 'https://list.youku.com/albumlist/items?id=' + id + '&size=20&callback=jq&ascending=' + asc + '&page=';
                var html = 'title:\"' + title + '\"$';
                var p = 1;
                while (true) {
                    var data = window.external.getHtmlCode(api_url + p);
                    data = data.substring('window.jq && jq('.length, data.length - 2);
                    data = JSON.stringify(JSON.parse(data));
                    data = data.replace(/\\\\\"/g, '\"');
                    if (data.indexOf('\"html\":\"\"') != -1)
                        break;

                    html += data;
                    p++;
                    window.external.doEvents();
                }

                if (typeof(window.external.receive) != 'undefined')
                    window.external.receive(html);
                else
                    document.body.innerHTML = html;
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="youku" watchList="true" crpj="true">
        <url><![CDATA[youku\.com/v_show/id_.*?\.html?.*&f=(?<id>[^&]+)]]></url>
        <title><![CDATA[title:"([^"]+)]]></title>
        <content><![CDATA[(?is)<div.*?<a\s+title="(?<title>[^"]+)"\s+href="(?<url>[^"]+).*?<span>(?<duration>[^<]+)]]></content>
        <jsCode><![CDATA[
            try {
                //https://v.youku.com/v_show/id_XMzU4NjMyMDk5Ng==.html?spm=a2hzp.8253876.0.0&f=51720105
                var title = document.body.innerHTML.match(/playlistTitle\":\"([^\"]+)/)[1];
                var id = window.PageConfig.folderId;
                var api_url = 'https://list.youku.com/albumlist/items?id=' + id + '&size=20&callback=jq&page=';
                var html = 'title:\"' + title + '\"$';
                var p = 1;
                while (true) {
                    var data = window.external.getHtmlCode(api_url + p);
                    data = data.substring('window.jq && jq('.length, data.length - 2);
                    data = JSON.stringify(JSON.parse(data));
                    data = data.replace(/\\\\\"/g, '\"');
                    if (data.indexOf('\"html\":\"\"') != -1)
                        break;

                    html += data;
                    p++;
                    window.external.doEvents();
                }

                if (typeof(window.external.receive) != 'undefined')
                    window.external.receive(html);
                else
                    document.body.innerHTML = html;
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="iqiyi" crpj="true" delay="2500">
        <url><![CDATA[iqiyi\.com/(?:u/(?<id>\d+)/videos|\w+/space/(?<id>[^/]+))]]></url>
        <title><![CDATA[title:"([^"]+)]]></title>
        <content><![CDATA[(?is)v_title:"(?<title>[^"]*)",thumbnail:(?<thumbnail>[^,]*),duration:(?<duration>[^,]*),video_url:(?<url>[^;]*)]]></content>
        <total><![CDATA[total:([^,]+)]]></total>
        <startPage><![CDATA[startPage:([^,]+)]]></startPage>
        <hasMore><![CDATA[hasMore:([^,]+)]]></hasMore>
        <headers><![CDATA[User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 12_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1]]></headers>
        <jsCode><![CDATA[
            try {
                //https://www.iqiyi.com/u/1469219878/videos
                var page_url = '';
                var api_url = '';
                var entries = window.performance.getEntriesByType('resource');
                for (let i = 0; i <= entries.length - 1; i++) {
                    var e = entries[i].name;
                    if (e.indexOf('get_videos.action?') != -1 || e.indexOf('get_small_videos.action?') != -1)
                        page_url = e;
                    else if (e.indexOf('episode_info.action?') != -1)
                        api_url = e;
                }

                if (page_url && api_url) {
                    page_url = page_url.replace(/&timestamp=[^&]+/, '').replace(/&page=.+/, '');
                    api_url = api_url.replace(/&timestamp=[^&]+/, '').replace(/&qipuIds=.+/, '') + '&qipuIds=';

                    var total = 0;
                    var title = document.getElementsByClassName('person-name').length != 0 ? document.getElementsByClassName('person-name')[0].innerText : document.title;
                    title += (window.location.href.indexOf('videoShort') != -1) ? '-短视频' : '';
                    var html = 'title:\"' + title + '\"$';
                    var pg = parseInt(window.external.sp) || 1;
                    var pmax = (window.external.sp != undefined) ? 49 : 99;
                    var pidx = 0;
                    var hasMore = false;
                    while (true) {
                        if (pidx > pmax)
                            break;

                        var ts = Date.now();
                        var args = 'GET' + sortArgs(page_url.replace('https://', '') + '&page=' + pg + '&size=28&timestamp=' + ts) + 'QMK8e4agKNWEppKU';
                        var page_url2 = page_url + '&page=' + pg + '&size=28&timestamp=' + ts + '&sign=' + sign(args);
                        var data = window.external.getHtmlCode(page_url2);
                        if (!data)
                            break;

                        var jo = JSON.parse(data);
                        hasMore = false;
                        if (jo.data) {
                            if (total == 0)
                                total = jo.data.totalNum || jo.data.storedNum;
                            hasMore = jo.data.hasMore == 1 || jo.data.tvids && jo.data.tvids.length != 0;
                            if (jo.data.sort && jo.data.sort.flows.length != 0 || jo.data.tvids) {
                                //sort...
                                var ids = '';
                                var vids = [];
                                if (jo.data.sort) {
                                    function dec(x, y) {
                                        return y.qipuId - x.qipuId;
                                    }
                                    jo.data.sort.flows.sort(dec);
                                    var ids = '';
                                    for (let i = 0; i <= jo.data.sort.flows.length - 1; i++) {
                                        vids[i] = jo.data.sort.flows[i].qipuId;
                                        ids += jo.data.sort.flows[i].qipuId + ',';
                                    }

                                    for (let i = 0; i <= jo.data.sort.flows.length - 1; i++)
                                        ids += jo.data.sort.flows[i].qipuId + ',';
                                }
                                else {
                                    vids = jo.data.tvids;
                                    for (let i = 0; i <= jo.data.tvids.length - 1; i++)
                                        ids += jo.data.tvids[i] + ',';
                                }
                                ids = ids.substr(0, ids.length - 1);
                                args = 'GET' + sortArgs(api_url.replace('https://', '') + ids + '&timestamp=' + ts) + 'QMK8e4agKNWEppKU';
                                data = window.external.getHtmlCode(api_url + ids + '&timestamp=' + ts + '&sign=' + sign(args));
                                jo = JSON.parse(data);
                                if (jo.data) {
                                    for (let i = 0; i <= vids.length - 1; i++) {
                                        var idx = vids[i];
                                        var item = jo.data[idx];
                                        var thumbnail = ''; //item.videoThumbnail...下载问题，先置其为空
                                        html += 'v_title:\"' + item.title + '\",thumbnail:' + thumbnail + ',duration:' + item.playTime + ',video_url:' + item.pageUrl + ';\r\n';
                                    }
                                }
                            }
                        }
                        if (!hasMore)
                            break;

                        pg++;
                        pidx++;
                        hasMore = true;
                        window.external.doEvents();
                    }
                    html = 'total:' + total + ',startPage:' + pg + ',hasMore:' + hasMore + ',' + html;
                    html = html.replace(/480_270/g, '1920_1080');
                    if (typeof(window.external.receive) != 'undefined')
                        window.external.receive(html);
                    else
                        document.body.innerHTML = html;
                }

                //...
                function sortArgs(url) {
                    var args = url.substring(url.indexOf('?') + 1);
                    var lt = args.split('&').sort();
                    return url.substring(0, url.indexOf('?') + 1) + lt.join('&');
                }

                function sign(e) {
                    return _(y(e));
                }
                function i(e, t) {
                    var n = (65535 & e) + (65535 & t);
                    return (e >> 16) + (t >> 16) + (n >> 16) << 16 | 65535 & n
                }
                function a(e, t) {
                    return e << t | e >>> 32 - t
                }
                function s(e, t, n, r, o, s) {
                    return i(a(i(i(t, e), i(r, s)), o), n)
                }
                function u(e, t, n, r, o, i, a) {
                    return s(t & n | ~t & r, e, t, o, i, a)
                }
                function c(e, t, n, r, o, i, a) {
                    return s(t & r | n & ~r, e, t, o, i, a)
                }
                function f(e, t, n, r, o, i, a) {
                    return s(t ^ n ^ r, e, t, o, i, a)
                }
                function l(e, t, n, r, o, i, a) {
                    return s(n ^ (t | ~r), e, t, o, i, a)
                }
                function d(e, t) {
                    e[t >> 5] |= 128 << t % 32,
                    e[14 + (t + 64 >>> 9 << 4)] = t;
                    var n, r, o, a, s, d = 1732584193, p = -271733879, h = -1732584194, g = 271733878;
                    for (n = 0; n < e.length; n += 16)
                        r = d,
                        o = p,
                        a = h,
                        s = g,
                        d = u(d, p, h, g, e[n], 7, -680876936),
                        g = u(g, d, p, h, e[n + 1], 12, -389564586),
                        h = u(h, g, d, p, e[n + 2], 17, 606105819),
                        p = u(p, h, g, d, e[n + 3], 22, -1044525330),
                        d = u(d, p, h, g, e[n + 4], 7, -176418897),
                        g = u(g, d, p, h, e[n + 5], 12, 1200080426),
                        h = u(h, g, d, p, e[n + 6], 17, -1473231341),
                        p = u(p, h, g, d, e[n + 7], 22, -45705983),
                        d = u(d, p, h, g, e[n + 8], 7, 1770035416),
                        g = u(g, d, p, h, e[n + 9], 12, -1958414417),
                        h = u(h, g, d, p, e[n + 10], 17, -42063),
                        p = u(p, h, g, d, e[n + 11], 22, -1990404162),
                        d = u(d, p, h, g, e[n + 12], 7, 1804603682),
                        g = u(g, d, p, h, e[n + 13], 12, -40341101),
                        h = u(h, g, d, p, e[n + 14], 17, -1502002290),
                        p = u(p, h, g, d, e[n + 15], 22, 1236535329),
                        d = c(d, p, h, g, e[n + 1], 5, -165796510),
                        g = c(g, d, p, h, e[n + 6], 9, -1069501632),
                        h = c(h, g, d, p, e[n + 11], 14, 643717713),
                        p = c(p, h, g, d, e[n], 20, -373897302),
                        d = c(d, p, h, g, e[n + 5], 5, -701558691),
                        g = c(g, d, p, h, e[n + 10], 9, 38016083),
                        h = c(h, g, d, p, e[n + 15], 14, -660478335),
                        p = c(p, h, g, d, e[n + 4], 20, -405537848),
                        d = c(d, p, h, g, e[n + 9], 5, 568446438),
                        g = c(g, d, p, h, e[n + 14], 9, -1019803690),
                        h = c(h, g, d, p, e[n + 3], 14, -187363961),
                        p = c(p, h, g, d, e[n + 8], 20, 1163531501),
                        d = c(d, p, h, g, e[n + 13], 5, -1444681467),
                        g = c(g, d, p, h, e[n + 2], 9, -51403784),
                        h = c(h, g, d, p, e[n + 7], 14, 1735328473),
                        p = c(p, h, g, d, e[n + 12], 20, -1926607734),
                        d = f(d, p, h, g, e[n + 5], 4, -378558),
                        g = f(g, d, p, h, e[n + 8], 11, -2022574463),
                        h = f(h, g, d, p, e[n + 11], 16, 1839030562),
                        p = f(p, h, g, d, e[n + 14], 23, -35309556),
                        d = f(d, p, h, g, e[n + 1], 4, -1530992060),
                        g = f(g, d, p, h, e[n + 4], 11, 1272893353),
                        h = f(h, g, d, p, e[n + 7], 16, -155497632),
                        p = f(p, h, g, d, e[n + 10], 23, -1094730640),
                        d = f(d, p, h, g, e[n + 13], 4, 681279174),
                        g = f(g, d, p, h, e[n], 11, -358537222),
                        h = f(h, g, d, p, e[n + 3], 16, -722521979),
                        p = f(p, h, g, d, e[n + 6], 23, 76029189),
                        d = f(d, p, h, g, e[n + 9], 4, -640364487),
                        g = f(g, d, p, h, e[n + 12], 11, -421815835),
                        h = f(h, g, d, p, e[n + 15], 16, 530742520),
                        p = f(p, h, g, d, e[n + 2], 23, -995338651),
                        d = l(d, p, h, g, e[n], 6, -198630844),
                        g = l(g, d, p, h, e[n + 7], 10, 1126891415),
                        h = l(h, g, d, p, e[n + 14], 15, -1416354905),
                        p = l(p, h, g, d, e[n + 5], 21, -57434055),
                        d = l(d, p, h, g, e[n + 12], 6, 1700485571),
                        g = l(g, d, p, h, e[n + 3], 10, -1894986606),
                        h = l(h, g, d, p, e[n + 10], 15, -1051523),
                        p = l(p, h, g, d, e[n + 1], 21, -2054922799),
                        d = l(d, p, h, g, e[n + 8], 6, 1873313359),
                        g = l(g, d, p, h, e[n + 15], 10, -30611744),
                        h = l(h, g, d, p, e[n + 6], 15, -1560198380),
                        p = l(p, h, g, d, e[n + 13], 21, 1309151649),
                        d = l(d, p, h, g, e[n + 4], 6, -145523070),
                        g = l(g, d, p, h, e[n + 11], 10, -1120210379),
                        h = l(h, g, d, p, e[n + 2], 15, 718787259),
                        p = l(p, h, g, d, e[n + 9], 21, -343485551),
                        d = i(d, r),
                        p = i(p, o),
                        h = i(h, a),
                        g = i(g, s);
                    return [d, p, h, g]
                }
                function p(e) {
                    var t, n = '', r = 32 * e.length;
                    for (t = 0; t < r; t += 8)
                        n += String.fromCharCode(e[t >> 5] >>> t % 32 & 255);
                    return n
                }
                function h(e) {
                    var t, n = [];
                    for (n[(e.length >> 2) - 1] = void 0,
                    t = 0; t < n.length; t += 1)
                        n[t] = 0;
                    var r = 8 * e.length;
                    for (t = 0; t < r; t += 8)
                        n[t >> 5] |= (255 & e.charCodeAt(t / 8)) << t % 32;
                    return n
                }
                function g(e) {
                    return p(d(h(e), 8 * e.length))
                }
                function m(e, t) {
                    var n, r, o = h(e), i = [], a = [];
                    for (i[15] = a[15] = void 0,
                    o.length > 16 && (o = d(o, 8 * e.length)),
                    n = 0; n < 16; n += 1)
                        i[n] = 909522486 ^ o[n],
                        a[n] = 1549556828 ^ o[n];
                    return r = d(i.concat(h(t)), 512 + 8 * t.length),
                    p(d(a.concat(r), 640))
                }
                function _(e) {
                    var t, n, r = '0123456789abcdef', o = '';
                    for (n = 0; n < e.length; n += 1)
                        t = e.charCodeAt(n),
                        o += r.charAt(t >>> 4 & 15) + r.charAt(15 & t);
                    return o
                }
                function v(e) {
                    return unescape(encodeURIComponent(e))
                }
                function y(e) {
                    return g(v(e))
                }
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="iqiyi" crpj="true" delay="1500">
        <url><![CDATA[iqiyi\.com/u/(?<id>\d+)/feeds]]></url>
        <title><![CDATA[title:"([^"]+)]]></title>
        <content><![CDATA[(?is)v_title:"(?<title>[^"]+)",video_url:"(?<url>[^"]+)",duration:(?<duration>[^;]+)]]></content>
        <jsCode><![CDATA[
            try {
                //https://www.iqiyi.com/u/1469219878/feeds
                var completed = false;
                var page = 0;
                function interval() {
                    if (page > 99) {
                        completed = true;
                        return;
                    }

                    page++;
                    window.scrollTo(0, document.body.scrollHeight);
                    if (document.getElementsByClassName('sp-paopao-more').length == 0 || document.getElementsByClassName('sp-paopao-more')[0].innerText != '没有更多了')
                        setTimeout(interval, 1000);
                    else
                        completed = true;
                }

                if (document.getElementsByClassName('load-more').length != 0) {
                    setTimeout(interval, 500)
                    while (!completed)
                        window.external.doEvents();
                }

                //...
                var entries = window.performance.getEntriesByType('resource');
                var urls = [];
                for (let i = 0; i <= entries.length - 1; i++) {
                    var e = entries[i].name;
                    if (e.indexOf('get_entity_by_ids.action?') != -1)
                        urls.push(e.substr(0, e.indexOf('&callback=')));
                }

                var html = 'title:\"' + document.title + '\"$';
                for (let i = 0; i <= urls.length - 1; i++) {
                    var data = window.external.getHtmlCode(urls[i]);
                    var jo = JSON.parse(data);
                    for (var j in jo.data) {
                        var v = jo.data[j].object;
                        html += 'v_title:\"' + v.title + '\",video_url:\"' + v.pageUrl + '\",duration:' + v.playTime + ';\r\n';
                    }
                }

                if (typeof(window.external.receive) != 'undefined')
                    window.external.receive(html);
                else
                    document.body.innerHTML = html;
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="iqiyi" updateTitle="true">
        <url><![CDATA[tw\.iqiyi\.com/(?<id>a_[^\.]+)\.html?]]></url>
        <title><![CDATA[title:"([^"]+)]]></title>
        <content><![CDATA[(?is)tvId.*?(?:subtitle":"(?<describe>[^"]+).*?)?name":"(?<title>[^"]+).*?playUrl":"(?<url>[^"]+).*?duration":"(?<duration>[^"]+)]]></content>
        <jsCode><![CDATA[
            try {
                var title = document.title.substr(0, document.title.indexOf('-'));
                var html = 'title:\"' + title + '\"$';
                var data = window.external.getHtmlCode(window.location.href);
                var aid = 0;
                if (window.Q && window.Q.PageInfo && window.Q.PageInfo.playPageInfo)
                    aid = window.Q.PageInfo.playPageInfo.albumId;
                if (!aid)
                    aid = data.match(/aid:'([^']+)/) ? data.match(/aid:'([^']+)/)[1] : data.match(/albumId:\s+\"([^\"']+)/) ? data.match(/albumId:\s+\"([^\"']+)/)[1] : 0;
                var api_url = 'https://pcw-api.iqiyi.com/albums/album/avlistinfo?aid=' + aid + '&locale=zh_tw&size=30&callback=&page=';
                var p = 1;
                while (true) {
                    var data = window.external.getHtmlCode(api_url + p, window.location.href, true, 200);
                    if (data.indexOf('\"epsodelist\":[]') != -1)
                        break;

                    html += data;
                    p++;
                    window.external.doEvents();
                }

                if (typeof(window.external.receive) != 'undefined')
                    window.external.receive(html);
                else
                    document.body.innerHTML = html;
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="iqiyi">
        <url><![CDATA[iqiyi\.com/(?<id>a_[^\.]+)\.html?]]></url>
        <title><![CDATA[title:"([^"]+)]]></title>
        <content><![CDATA[(?is)(?:<li.*?img[^>]+src="(?<thumbnail>[^"]+).*?h3.*?href="(?<url>[^"]+)[^>]+>(?<title>[^<]+).*?</li>|tvId.*?name":"(?<title>[^"]+).*?playUrl":"(?<url>[^"]+).*?duration":"(?<duration>[^"]+))]]></content>
        <jsCode><![CDATA[
            try {
                var title = document.title.substr(0, document.title.indexOf('-'));
                var html = '';
                //分类别去取可能什么都返回不了，改为只取当前类的，即[全部]
                var app = document.getElementById('album_pic_paging');
                //页码在下面...https://www.iqiyi.com/a_19rrhr9x35.html
                if (app && app.style.display == 'block') {
                    var completed = false;
                    function interval() {
                        html += document.getElementById('albumpic-showall-wrap').innerHTML;
                        var lastChild = app.lastChild;
                        if (lastChild.className != 'noPage') {
                            lastChild.click();
                            setTimeout(interval, 2500);
                        }
                        else
                            completed = true;
                    }
                    setTimeout(interval, 2500)
                    while (!completed)
                        window.external.doEvents();
                }
                else {
                    //https://www.iqiyi.com/a_19rrhavtc9.html
                    //比如http://www.iqiyi.com/a_19rrk0snvl.html，1025集...889-942之间丢失
                    var aid = window.Q.PageInfo.playPageInfo.albumId;
                    var api_url = 'https://pcw-api.iqiyi.com/albums/album/avlistinfo?aid=' + aid + '&size=30&callback=&page=';
                    var p = 1;
                    while (true) {
                        var data = window.external.getHtmlCode(api_url + p);
                        if (data.indexOf('\"epsodelist\":[]') != -1)
                            break;

                        html += data;
                        p++;
                        window.external.doEvents();
                    }
                }
                if (!html && document.getElementsByClassName('piclist-wrapper').length != 0)
                    html += document.getElementsByClassName('piclist-wrapper')[0].innerHTML;

                //避免模板影响
                if (html.indexOf('<textarea') != -1)
                    html = html.substr(0, html.indexOf('<textarea'));
                html = 'title:\"' + title + '\"$' + html;
                if (typeof(window.external.receive) != 'undefined')
                    window.external.receive(html);
                else
                    document.body.innerHTML = html;
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="iqiyi" crpj="true" updateTitle="true">
        <url><![CDATA[iqiyi\.com/lib/(?<id>m_[^\.]+)\.html?]]></url>
        <title><![CDATA[title:"([^"]+)]]></title>
        <content><![CDATA[(?is)<li>\s+<a\s+title="(?<title>[^"]+).*?href="(?<url>[^"]+).*?</li>]]></content>
        <jsCode><![CDATA[
            try {
                var et = document.getElementById('j-album-title');
                var html = 'title:\"' + et.innerText + '\"$';
                var nws = document.getElementsByClassName('numlist-wrapper');
                for (let i = 0; i <= nws.length - 1; i++) {
                    var nw = nws[i];
                    var ul = nw.firstElementChild;
                    for (let j = 0; j <= ul.childElementCount - 1; j++) {
                        var a = ul.children[j].firstElementChild;
                        if (a.href.indexOf('so.iqiyi.com/') == -1)
                            break;
                        else
                            a.href = GetRedirectedUrl(a.href);
                    }

                    html += nw.innerHTML;
                    window.external.doEvents();
                }

                if (typeof(window.external.receive) != 'undefined')
                    window.external.receive(html);
                else
                    document.body.innerHTML = html;
            }
            catch (ex) {
            }

            function GetRedirectedUrl(url) {
                var html = window.external.getHtmlCode(url);
                var m = html.match(/URL='([^']+)/);
                return m ? m[1] : url;
            }
        ]]></jsCode>
    </item>
    <item domain="iqiyi" updateTitle="true">
        <url><![CDATA[iqiyi\.com/so/.*?q_(?<id>[^_?]+)]]></url>
        <title><![CDATA[placeholder="([^"]+)]]></title>
        <content><![CDATA[(?is)<div[^>]+class="qy-search-result-item.*?title="(?<title>[^"]+).*?href="(?<url>[^"]+).*?qy-mod-label">(?<duration>[^<]+)]]></content>
    </item>
    <item domain="cctv" crpj="true">
        <url><![CDATA[cctv\.com/lm/(?<id>[^/]+)/]]></url>
        <title><![CDATA[<title>([^_]+)[^<]+</title>]]></title>
        <content><![CDATA[(?is)(?:\{"guid.*?title":"(?<title>[^"]+).*?image":"(?<thumbnail>[^"]+).*?url":"(?<url>[^"]+)|<li>.*?href="(?<url>[^"]+).*?src="(?<thumbnail>[^"]+).*?class="text.*?>(?<title>[^<]+)</a>)]]></content>
        <jsCode><![CDATA[
            try {
                if (window.lmtopId) {
                    var id = document.body.innerHTML.match(/TOPC\d+/)[0];
                    var api_url = 'http://api.cntv.cn/NewVideo/getVideoListByColumn?id=' + id + '&n=100&sort=desc&mode=0&serviceId=tvcctv&p=';
                    var html = '';
                    var p = 1;
                    while (true) {
                        var data = window.external.getHtmlCode(api_url + p);
                        if (data.indexOf('\"list\":[]') != -1)
                            break;

                        html += data;
                        p++;
                        window.external.doEvents();
                    }

                    if (typeof(window.external.receive) != 'undefined')
                        window.external.receive(html);
                    else
                        document.body.innerHTML = html;
                }
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="cctv">
        <url><![CDATA[cctv\.com/\d{4}/\d{2}/\d{2}/(?<id>VIDA[^.]+)\.shtml]]></url>
        <title><![CDATA[<title>([^_]+)[^<]+</title>]]></title>
        <content><![CDATA[(?is)(?:<div\s+class="img.*?a\s+title="(?<title>[^"]+).*?href="(?<url>[^"]+).*?lazy="(?<thumbnail>[^"]+)|'title':'(?<title>[^']+).*?'img':'(?<img>[^']+).*?'url':'(?<url>[^']+))]]></content>
    </item>
    <item domain="cctv" crpj="true">
        <url><![CDATA[cctv\.com/search.php\?.*?qtext=[^&]+]]></url>
        <title><![CDATA[title:"([^"]+)"]]></title>
        <content><![CDATA[(?is)\{"id.*?all_title":"(?<title>[^"]+).*?urllink":"(?<url>[^"]+).*?imglink":"(?<thumbnail>[^"]+).*?durations":(?<duration>[^,]+)]]></content>
        <jsCode><![CDATA[
            try {
                var title = qtext_str;
                var api_url = 'https://search.cctv.com/ifsearch.php?qtext=' + qtext + '&sort=relevance&pageSize=20&type=video&vtime=-1&datepid=1&channel=&pageflag=0&qtext_str=' + qtext + '&page=';
                var html = 'title:\"' + title + '\"$';
                var p = 1;
                while (true) {
                    var data = window.external.getHtmlCode(api_url + p);
                    var jo = JSON.parse(data);
                    html += JSON.stringify(jo.list);
                    if (JSON.stringify(jo.pageString).indexOf('下一页') == -1)
                        break;

                    p++;
                    window.external.doEvents();
                }

                if (typeof(window.external.receive) != 'undefined')
                    window.external.receive(html);
                else
                    document.body.innerHTML = html;
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="docuchina">
        <url><![CDATA[docuchina\.cn/.*?/VIDA(?<id>[^.]+)\.s?html?]]></url>
        <title><![CDATA[<title>([^_]+)[^<]+</title>]]></title>
        <content><![CDATA[(?is)<li\s+.*?src="(?<thumbnail>[^"]+).*?text.*?href="(?<url>[^"]+).*?>(?<title>[^<]+)]]></content>
        <jsCode><![CDATA[
            try {
                //http://www.docuchina.cn/2014/01/13/VIDA1389598340216690.shtml
                document.body.innerHTML = document.getElementById('ypdianbo').innerHTML;
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="mgtv" crpj="true">
        <url><![CDATA[mgtv\.com/h/(?<id>\d+)\.html?]]></url>
        <title><![CDATA[title:"([^"]+)"]]></title>
        <content><![CDATA[(?is)v_title:"(?<title>[^"]+)",thumbnail:"(?<thumbnail>[^"]+)",video_url:"(?<url>[^"]+)",duration:(?<duration>[^;]+)]]></content>
        <baseUrl><![CDATA[https://www.mgtv.com]]></baseUrl>
        <headers><![CDATA[User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36 Edge/18.17763]]></headers>
        <ckSign><![CDATA[loginAccount]]></ckSign>
        <jsCode><![CDATA[
            try {
                //https://www.mgtv.com/h/349309.html
                //https://www.mgtv.com/h/345876.html
                var cid = window.location.href.match(/\w\/(\d+)/)[1];
                var api_url = 'https://pcweb.api.mgtv.com/episode/list?collection_id=' + cid + '&size=30&callback=&page=';
                var cookie = window.external.getCookie(window.location.href) || document.cookie;
                var headers = 'Referer: ' + window.location.href + '\r\nCookie: ' + cookie;
                var html = '';
                var title = '';
                var p = 1;
                while (true) {
                    var data = window.external.getHtmlCodeEx(api_url + p, headers);
                    var jo = JSON.parse(data);
                    if (!title)
                        title = jo.data.info.title;
                    for (var v in jo.data.list) {
                        var video = jo.data.list[v];
                        html += 'v_title:\"' + video.t4 + ' ' + video.t2 + '\",thumbnail:\"' + video.img + '\",video_url:\"' + video.url + '\",duration:' + video.time + ';';
                    }
                    if (jo.data.total_page == p)
                         break;

                    p++;
                    window.external.doEvents();
                }
                html = 'title:\"' + title + '\"$' + html;
                if (typeof(window.external.receive) != 'undefined')
                    window.external.receive(html);
                else
                    document.body.innerHTML = html;
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="mgtv" watchList="true" crpj="true">
        <url><![CDATA[mgtv\.com/\w/(?<id>\d+)/\d+\.html?]]></url>
        <title><![CDATA[title:"([^"]+)"]]></title>
        <content><![CDATA[(?is)v_title:"(?<title>[^"]+)",thumbnail:"(?<thumbnail>[^"]+)",video_url:"(?<url>[^"]+)",duration:(?<duration>[^;]+)]]></content>
        <baseUrl><![CDATA[https://www.mgtv.com]]></baseUrl>
        <headers><![CDATA[User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36 Edge/18.17763]]></headers>
        <jsCode><![CDATA[
            try {
                //https://www.mgtv.com/b/338922/9698444.html
                var vid = window.location.href.match(/\d+\/(\d+)/)[1];
                var api_url = 'https://pcweb.api.mgtv.com/episode/list?video_id=' + vid + '&size=30&callback=&page=';
                var html = '';
                var title = '';
                var p = 1;
                while (true) {
                    var data = window.external.getHtmlCode(api_url + p, window.location.href);
                    var jo = JSON.parse(data);
                    if (!title)
                        title = jo.data.info.title;
                    for (var v in jo.data.list) {
                        var video = jo.data.list[v];
                        html += 'v_title:\"' + video.t4 + ' ' + video.t2 + '\",thumbnail:\"' + video.img + '\",video_url:\"' + video.url + '\",duration:' + video.time + ';';
                    }
                    if (jo.data.total_page == p)
                         break;

                    p++;
                    window.external.doEvents();
                }
                html = 'title:\"' + title + '\"$' + html;
                if (typeof(window.external.receive) != 'undefined')
                    window.external.receive(html);
                else
                    document.body.innerHTML = html;
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="sohu" crpj="true">
        <url><![CDATA[tv\.sohu\.com/.*?user_id=(?<id>[^#]+)]]></url>
        <title><![CDATA[title:"([^"]+)"]]></title>
        <content><![CDATA[(?is)v_title:"(?<title>[^"]+)",video_url:"(?<url>[^"]+)",duration:(?<duration>[^,]+),date:(?<date>[^;]+)]]></content>
        <startPage><![CDATA[startPage:([^,]+)]]></startPage>
        <hasMore><![CDATA[hasMore:([^,]+)]]></hasMore>
        <jsCode><![CDATA[
            try {
                //https://m.tv.sohu.com/upload/clientapp/pgc/user.html?user_id=343901672#newWorks
                //https://m.tv.sohu.com/upload/clientapp/pgc/user.html?user_id=342794517#feed 13636条
                var title = (document.getElementsByClassName('publisher-name').length != 0) ? document.getElementsByClassName('publisher-name')[0].innerText : window.pageInfo.title;
                var uid = window.location.href.match(/user_id=([^#]+)/)[1];
                var api_url = 'https://fans.tv.sohu.com/star/h5/userWorks?callback=&userId=' + uid + '&visitType=0&size=48&_=' + Date.now() + '&lastId=';
                var html = 'title:\"' + title + '\"$';
                var last_id = window.external.sp || -1;
                var p = 0;
                var pmax = 49;
                var hasMore = false;
                while (true) {
                    if (p > pmax)
                        break;
                    var data = window.external.getHtmlCode(api_url + last_id, window.location.href);
                    var jo = JSON.parse(data);
                    for (var v in jo.data.list) {
                        var video = jo.data.list[v];
                        html += 'v_title:\"' + video.videoInfo.video_name + '\",video_url:\"' + video.videoInfo.url_html5 + '\",duration:' + video.videoInfo.total_duration + ',date:' + video.formatTime + ';';
                    }
                    if (!jo.data.hasmore) {
                        hasMore = false;
                        break;
                    }

                    last_id = jo.data.lastId;
                    p++;
                    hasMore = true;
                    window.external.doEvents();
                }
                html = 'startPage:' + last_id + ',hasMore:' + hasMore + ',' + html;
                if (typeof(window.external.receive) != 'undefined')
                    window.external.receive(html);
                else
                    document.body.innerHTML = html;
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="sohu" crpj="true" delegate="true">
        <url><![CDATA[tv\.sohu\.com/user/(?:(?<id>\d+)|.*?uid=(?<id>\d+))]]></url>
        <title><![CDATA[title:"([^"]+)"]]></title>
        <content><![CDATA[(?is)v_title:"(?<title>[^"]+)",video_url:"(?<url>[^"]+)",duration:(?<duration>[^,]+),date:(?<date>[^;]+)]]></content>
        <startPage><![CDATA[startPage:([^,]+)]]></startPage>
        <hasMore><![CDATA[hasMore:([^,]+)]]></hasMore>
        <jsCode><![CDATA[
            try {
                //https://tv.sohu.com/user/343901199#t0 ->
                //https://tv.sohu.com/user/profile/profile_video.do?uid=343901199&pg=1&size=25&sortType=2
                //var  = (document.getElementsByClassName('uname').length != 0) ? document.getElementsByClassName('uname')[0].innerText : document.title;
                var html = window.external.getHtmlCode(window.external.url);
                var title = html.match(/\"uname\">([^<]+)/)[1];
                var uid = (window.external.url.indexOf('uid') == -1) ? window.external.url.match(/user\/([^&#]+)/)[1] : window.external.url.match(/uid=([^&#]+)/)[1];
                var api_url = 'https://my.tv.sohu.com/user/a/rvideo/ta/list.do?userId=' + uid + '&sortType=2&size=25&pg=';
                var html = 'title:\"' + title + '\"$';
                var p = parseInt(window.external.sp) || 1;
                if (p == 0)
                    p = 1;
                var pmax = (window.external.sp != undefined) ? 49 : 199;
                var pidx = 0;
                var hasMore = false;
                while (true) {
                    if (pidx > pmax)
                        break;
                    var data = window.external.getHtmlCode(api_url + p, window.external.url);
                    var jo = JSON.parse(data);
                    for (var v in jo.data.list) {
                        var video = jo.data.list[v];
                        html += 'v_title:\"' + video.title + '\",video_url:\"' + video.url + '\",duration:' + video.videoLength + ',date:' + video.uploadTime + ';';
                    }
                    if (!jo.data.haveMore) {
                        hasMore = false;
                        break;
                    }

                    p++;
                    pidx++;
                    hasMore = true;
                    window.external.doEvents();
                }
                html = 'startPage:' + p + ',hasMore:' + hasMore + ',' + html;
                if (typeof(window.external.receive) != 'undefined')
                    window.external.receive(html);
                else
                    document.body.innerHTML = html;
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="fun" crpj="true">
        <url><![CDATA[fun\.tv/subject/(?<id>[^/]+)]]></url>
        <title><![CDATA[title:"([^"]+)"]]></title>
        <content><![CDATA[(?is)v_title:"(?<title>[^"]+)",thumbnail:"(?<thumbnail>[^"]+)",video_url:"(?<url>[^"]+)",duration:(?<duration>[^;]+)]]></content>
        <baseUrl><![CDATA[http://www.fun.tv]]></baseUrl>
        <headers><![CDATA[User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36 Edge/18.17763]]></headers>
        <jsCode><![CDATA[
            try {
                //http://www.fun.tv/subject/338349/
                var id = window.location.href.match(/subject\/([^\/]+)/)[1];
                var api_url = 'http://q1.fun.tv/ajax/vod_panel/' + id + '?uc=109&isajax=1';
                var data = window.external.getHtmlCode(api_url, window.location.href);
                if (data) {
                    var jo = JSON.parse(data);
                    if (jo.data.videos.length != 0) {
                        var html = '\"title:\"' + jo.data.name + '\"$';
                        for (var v in jo.data.videos) {
                            var video = jo.data.videos[v];
                            html += 'v_title:\"' + video.name + '\",thumbnail:\"' + video.pic + '\",video_url:\"' + video.url + '\",duration:' + video.duration + ';';
                        }

                        if (typeof(window.external.receive) != 'undefined')
                            window.external.receive(html);
                        else
                            document.body.innerHTML = html;
                    }
                }
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="zhihu" crpj="true">
        <url><![CDATA[zhihu\.com/people/(?<id>[^/]+)]]></url>
        <title><![CDATA[title:"([^"]+)"]]></title>
        <content><![CDATA[(?is)v_title:"(?<title>[^"]+)",thumbnail:"(?<thumbnail>[^"]+)",video_url:"(?<url>[^"]+)",duration:(?<duration>[^,]+),date:(?<date>[^;]+)]]></content>
        <jsCode><![CDATA[
            try {
                //https://www.zhihu.com/people/ai-chi-zha-ji-de-qy/zvideos
                var title = (document.getElementsByClassName('ProfileHeader-name').length != 0) ? document.getElementsByClassName('ProfileHeader-name')[0].innerText : document.title;
                var uid = window.location.href.match(/people\/([^\/]+)/)[1];
                var api_url = 'https://www.zhihu.com/api/v4/members/' + uid + '/zvideos?limit=20&offset=';
                var html = 'title:\"' + title + '\"$';
                var offset = 0;
                while (true) {
                    var data = window.external.getHtmlCode(api_url + offset);
                    var jo = JSON.parse(data);
                    if (jo.data.length == 0)
                        break;

                    for (var v in jo.data) {
                        var video = jo.data[v];
                        var video_url = '';
                        var pl = video.video.playlist;
                        if (pl.fhd)
                            video_url = pl.fhd.play_url;
                        else if (pl.hd)
                            video_url = pl.hd.play_url;
                        else if (pl.sd)
                            video_url = pl.sd.play_url;
                        else if (pl.ld)
                            video_url = pl.ld.play_url;
                        else
                            video_url = video.url;
                        html += 'v_title:\"' + video.title + '\",thumbnail:\"' + video.image_url + '\",video_url:\"' + video_url + '\",duration:' + video.video.duration + ',date:' + video.published_at + ';';
                    }
                    offset += 20;
                    window.external.doEvents();
                }

                if (typeof(window.external.receive) != 'undefined')
                    window.external.receive(html);
                else
                    document.body.innerHTML = html;
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="56" crpj="true">
        <url><![CDATA[56\.com/u/(?<id>[^/]+)/videos]]></url>
        <title><![CDATA[title:"([^"]+)"]]></title>
        <content><![CDATA[(?is)\{"id".*?title":"(?<title>[^"]+).*?videoLength":(?<duration>[^,]+).*?smallCover":"(?<thumbnail>[^"]+).*?videoUrl":"(?<url>[^"]+)"\}]]></content>
        <jsCode><![CDATA[
            try {
                var title = document.getElementsByClassName('h1')[0].innerText;
                var uid = _CONFIG.sohu_uid;
                var api_url = 'https://my.tv.sohu.com/user/wm/56ta/v.do?uid=' + uid + '&sortType=2&size=40&callback=&_=' + Date.now() + '&pg=';
                var html = 'title:\"' + title + '\"$';
                var p = 1;
                while (true) {
                    var data = window.external.getHtmlCode(api_url + p);
                    if (data.indexOf('\"list\":[{') == -1)
                        break;

                    var jo = JSON.parse(data.trim());
                    for (var v in jo.data.list)
                        jo.data.list[v].videoUrl = 'http://my.tv.sohu.com/us/' + jo.data.list[v].userId + '/' + jo.data.list[v].id + '.shtml';
                    html += JSON.stringify(json);
                    p++;
                    window.external.doEvents();
                }

                if (typeof(window.external.receive) != 'undefined')
                    window.external.receive(html);
                else
                    document.body.innerHTML = html;
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="le" crpj="true">
        <url><![CDATA[\.le\.com/\w+/(?<id>\d+)\.html?]]></url>
        <title><![CDATA[title:"([^"]+)"]]></title>
        <content><![CDATA[(?is)<div.*?<img[^>]+src="(?<thumbnail>[^"]+).*?video_info">(?<duration>[^<]+).*?a[^>]+href="(?<url>[^"]+).*?>(?<title>[^<]+).*?d_cnt">(?<describe>[^<]*)]]></content>
        <jsCode><![CDATA[
            try {
                var title = document.getElementsByClassName('top_tit')[0].firstChild.innerText;
                var html = 'title:\"' + title + '\"$';
                var jl = document.getElementsByClassName('juji_list')[0];
                jl.lastChild.click();
                //delay
                var completed = false;
                setTimeout(function () {
                    completed = true;
                }, 1000);
                while (!completed)
                    window.external.doEvents();
                html += document.getElementsByClassName('j_all_tuwen')[0].innerHTML;

                if (typeof(window.external.receive) != 'undefined')
                    window.external.receive(html);
                else
                    document.body.innerHTML = html;
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="pptv" crpj="true" updateTitle="true">
        <url><![CDATA[pptv\.com/page/(?<id>[^?]+)\?]]></url>
        <title><![CDATA[title:"([^"]+)"]]></title>
        <content><![CDATA[(?is)<a\s+title="(?<title>[^"]+)"\s+href="(?<url>[^"]+).*?</a>]]></content>
        <jsCode><![CDATA[
            try {
                var title = document.getElementsByTagName('h1')[0].innerText;
                var html = 'title:\"' + title + '\"$';
                //比如https://v.pptv.com/page/BzsVkicth0Q9y8Fg.html?spm=v_show_web.0.1.3.1.2.1.3.5.1
                if (document.getElementById('juji_jlist1') && document.getElementById('juji_jlist1').childElementCount != 0) {
                    var jl = document.getElementById('juji_jlist1');
                    for (var i = 0; i <= jl.childElementCount - 1; i++) {
                        child = jl.children[i];
                        child.click();
                        //delay
                        var completed = false;
                        setTimeout(function () {
                            completed = true;
                        }, 500);
                        while (!completed)
                            window.external.doEvents();
                        html += document.getElementById('juji_' + (i + 1)).innerHTML;
                    }
                }
                else
                    html += document.getElementById('juji_1').innerHTML;

                if (typeof(window.external.receive) != 'undefined')
                    window.external.receive(html);
                else
                    document.body.innerHTML = html;
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="pptv" crpj="true">
        <url><![CDATA[pptv\.com/\w+/\?username=(?<id>[^#]+)#video]]></url>
        <title><![CDATA[title:"([^"]+)"]]></title>
        <content><![CDATA[(?is)\{.*?title":"(?<title>[^"]+).*?url":"(?<thumbnail>[^"]+).*?duration":(?<duration>[^,]+).*?link":"(?<url>[^"]+)]]></content>
        <jsCode><![CDATA[
            try {
                var title = document.getElementsByTagName('h3')[0].innerText;
                var author = window.external.url.match(/username=([^#]+)/)[1];
                var url = 'https://ppsvc.pptv.com/author/tuWenSearch.htm?cb=&author=' + author + '&ps=20&appver=1.0&appplt=web&auth=1&appid=1&ppi=1&showDuration=true&&encrypt=1&pn=';
                var html = 'title:\"' + title + '\"$';
                var p = 1;
                while (true) {
                    var data = window.external.getHtmlCode(url + p);
                    if (data.indexOf('\"tuWens\":null') != -1)
                        break;

                    html += data;
                    p++;
                    window.external.doEvents();
                }

                if (typeof(window.external.receive) != 'undefined')
                    window.external.receive(html);
                else
                    document.body.innerHTML = html;
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="xinpianchang" crpj="true">
        <url><![CDATA[xinpianchang\.com/(?:u|user/space/id-)(?<id>\d+)]]></url>
        <title><![CDATA[title:"([^"]+)"]]></title>
        <content><![CDATA[(?is)<li\s+.*?data-articleid="(?<url>[^"]+).*?<img[^>]+_src="(?<thumbnail>[^"]+).*?duration[^>]+>(?<duration>[^<]+).*?>(?<date>[^<]+)发布.*?<a.*?<p[^>]+>(?<title>[^<]+)]]></content>
        <baseUrl><![CDATA[https://www.xinpianchang.com/a]]></baseUrl>
        <jsCode><![CDATA[
            try {
                //https://www.xinpianchang.com/u10019394
                var title = document.body.innerHTML.match(/data-username=\"([^\"]+)\"/)[1];
                var userid = document.body.innerHTML.match(/data-userid=\"([^\"]+)\"/)[1];
                var url = 'https://www.xinpianchang.com/index.php?app=user&ac=space&ajax=1&id=' + userid + '&d=1&sort=pick&cateid=0&audit=1&is_private=0&page=';
                var html = 'title:\"' + title + '\"$';
                var p = 1;
                while (true) {
                    var data = window.external.getHtmlCode(url + p, window.external.url);
                    if (!data)
                        break;

                    data = data.replace(/\' /g, ':').replace(/\'\'/g, '');
                    html += data;
                    p++;
                    window.external.doEvents();
                }

                if (typeof(window.external.receive) != 'undefined')
                    window.external.receive(html);
                else
                    document.body.innerHTML = html;
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="xinpianchang" crpj="true">
        <url><![CDATA[xinpianchang\.com/.*?search.*?kw[=-](?<id>[^/]+)]]></url>
        <title><![CDATA[<title>([^<]+)\s+-\s+新片场</title>]]></title>
        <content><![CDATA[(?is)<li\s+class="enter-filmplay.*?data-articleid="(?<url>[^"]+).*?<img[^>]+src="(?<thumbnail>[^"]+).*?duration[^>]+>(?<duration>[^<]+).*?>(?<date>[^<]+)发布.*?<a.*?<p[^>]+>(?<title>.*?)</p>]]></content>
        <baseUrl><![CDATA[https://www.xinpianchang.com/a]]></baseUrl>
        <jsCode><![CDATA[
            try {
                //https://www.xinpianchang.com/index.php?app=search&kw=一路向秋
                document.body.innerHTML = document.body.innerHTML.replace(/\' /g, ':').replace(/\'\'/g, '');
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="weibo" crpj="true" delay="7500">
        <url><![CDATA[weibo\.com/p/(?<id>\d+)/photos\?type=video]]></url>
        <title><![CDATA[<h1[^>]+>([^<]+)</h1>]]></title>
        <content><![CDATA[(?is)<li\s+class="photo_module">.*?<a\s+href="(?<url>[^"]+).*?<img[^>]+src="(?<thumbnail>[^"]+).*?video_time">(?<duration>[^<]+).*?<div[^>]+>(?<title>[^<]+).*?</li>]]></content>
        <ckSign><![CDATA[SSOLoginState]]></ckSign>
        <jsCode><![CDATA[
            try {
                //7.5S，以使cookie取到
                //https://weibo.com/p/1006061809745371/photos?type=video#place
                var pageId = $CONFIG.page_id;
                var p = 1;
                var baseUrl = 'https://weibo.com/p/aj/album/loading?ajwvr=6&ajax_call=1&page_id=' + pageId;
                var data = document.body.innerHTML.replace(/\\\\\"/g, '\"').replace(/\\\//g, '/').replace(/\\n/g, ' ');
                var html = data;
                while (true) {
                    var m = data.match(/loading\"\s+action-data=\"([^\"]+)/);
                    if (!m)
                        break;

                    var args = m[1];
                    var url = baseUrl + '&' + args + '&page=' + p + '&__rnd=' + Date.now();
                    var data = window.external.getHtmlCode(url);
                    data = unescape(data.replace(/\\\\\"/g, '\"').replace(/\\\//g, '/').replace(/\\u/g, '%u'))
                    html += data;
                    p++;
                }

                if (typeof(window.external.receive) != 'undefined')
                    window.external.receive(html);
                else
                    document.body.innerHTML = html;
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <!--<item domain="weibo" crpj="true" delay="7500">
        <url><![CDATA[weibo\.com/p/(?<id>\d+)/photos\?type=photo]]></url>
        <title><![CDATA[<h1[^>]+>([^<]+)</h1>]]></title>
        <content><![CDATA[(?is)<li\s+class="photo_module">.*?<a\s+href="(?<url>[^"]+).*?<img[^>]+src="(?<thumbnail>[^"]+).*?video_time">(?<duration>[^<]+).*?<div[^>]+>(?<title>[^<]+).*?</li>]]></content>
        <ckSign><![CDATA[SSOLoginState]]></ckSign>
        <jsCode><![CDATA[
            try {
                //相册
                //https://weibo.com/p/1006061809745371/photos?type=photo#place
                var pageId = $CONFIG.page_id;
                var p = 1;
                var baseUrl = 'https://weibo.com/p/aj/album/loading?ajwvr=6&ajax_call=1&page_id=' + pageId;
                var data = document.body.innerHTML.replace(/\\\\\"/g, '\"').replace(/\\\//g, '/').replace(/\\n/g, ' ');
                var html = data;
                while (true) {
                    var m = data.match(/loading\"\s+action-data=\"([^\"]+)/);
                    if (!m)
                        break;

                    var args = m[1];
                    var url = baseUrl + '&' + args + '&page=' + p + '&__rnd=' + Date.now();
                    var data = window.external.getHtmlCode(url);
                    data = unescape(data.replace(/\\\\\"/g, '\"').replace(/\\\//g, '/').replace(/\\u/g, '%u'))
                    html += data;
                    p++;
                }

                if (typeof(window.external.receive) != 'undefined')
                    window.external.receive(html);
                else
                    document.body.innerHTML = html;;
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>-->
    <item domain="51zxw" crpj="true">
        <url><![CDATA[(?i)51zxw\.net/list\.aspx\?cid=(?<id>\d+)(?:#.*?)?$]]></url>
        <title><![CDATA[<div\s+class="title">\s*([^<]+)\s*</div>]]></title>
        <content><![CDATA[(?is)<li>video_url:"(?<url>[^"]+)",\s+title:"(?<title>[^"]+)]]></content>
        <jsCode><![CDATA[
            try {
                var ep = document.getElementById('pages');
                var pc = (ep.childElementCount != 0) ? ep.firstChild.childElementCount - 4 : 1;
                var html = '';
                var cid = window.external.url.match(/cid=(\d+)/)[1];
                for (let p = 1; p <= pc; p++) {
                    var url = 'https://www.51zxw.net/MainExtend/AjaxGetChapters.ashx';
                    var args = 'cid=' + cid + '&pageIndex=' + p;
                    var data = window.external.getPostResultEx(url, args, 'Content-Type: application/x-www-form-urlencoded; charset=gb2312');
                    var jo = JSON.parse(data);
                    if (jo.data) {
                        for (var i in jo.data) {
                            var video = jo.data[i];
                            if (!video.Highlight)
                                html += '<li>video_url:\"https://www.51zxw.net/Show.aspx?cid=' + video.Classid + '&id=' + video.Articleid + '\", title:\"' + video.Title + '\"</li>';
                        }
                    }
                }
                document.body.innerHTML += '$' + html;
            }
            catch (ex) {
            }
        ]]></jsCode>

    </item>
    <item domain="gdtv">
        <url><![CDATA[gdtv\.cn/\w+/(?<id>\w+)/(?:[^/]*)$]]></url>
        <title><![CDATA[<div\s+class="cname">([^<]+)</div>]]></title>
        <content><![CDATA[(?is)<li>\s+<a\s+href="(?<url>[^"]+)[^>]+title="(?<title>[^"]+)"><img\s+alt.*?<div\s+class="cduration"\s+>(?<duration>[^<]+)</div>\s+</li>]]></content>
    </item>
    <item domain="gdtv" crpj="true">
        <url><![CDATA[gdtv\.cn/tvColumn/(?<id>\d+)]]></url>
        <title><![CDATA[title:"([^"]+)]]></title>
        <content><![CDATA[(?is)<a\s+title="(?<title>[^"]+).*?href="(?<url>[^"]+).*?(?<duration>\d+:\d+)</span>]]></content>
        <baseUrl><![CDATA[https://www.gdtv.cn]]></baseUrl>
        <jsCode><![CDATA[
            try {
                //https://www.gdtv.cn/tvColumn/683
                if (document.getElementsByClassName('ant-select-arrow').length != 0)
                    document.getElementsByClassName('ant-select-arrow')[0].click();

                var title = document.getElementsByTagName('h2').length != 0 ? document.getElementsByTagName('h2')[0].innerText : document.title;
                var html = 'title:\"' + title + '\"';
                //year
                for (var i = 0; i <= document.getElementsByTagName('li').length - 1; i++) {
                    document.getElementsByTagName('li')[i].click();
                    delay(2000);
                    //no more...
                    var vd = document.getElementById('videoList');
                    if (!vd || vd.innerText.indexOf('当前时间段暂无节目内容，换个时间试试看~') != -1)
                        break;

                    //month
                    var mdiv = undefined;
                    for (var j = 0; j <= document.getElementsByTagName('div').length - 1; j++) {
                        if (document.getElementsByTagName('div')[j].className && document.getElementsByTagName('div')[j].className.indexOf('index__month-group') != -1) {
                            mdiv = document.getElementsByTagName('div')[j];
                            break;
                        }
                    }
                    if (mdiv && mdiv.childElementCount != 0) {
                        for (var j = 0; j <= mdiv.childElementCount - 1; j++) {
                            mdiv.children[j].children[0].click();
                            delay(2000);
                            //https://www.gdtv.cn/tvColumn/660它居然动态加载...实测，没毛用
                            //window.scrollTo(0, document.body.scrollHeight);
                            //delay(1500);

                            vd = document.getElementById('videoList');
                            if (!vd || vd.innerText.indexOf('当前时间段暂无节目内容，换个时间试试看~') != -1)
                                break;
                            html += '$' + vd.innerHTML;
                        }
                    }
                }
                if (typeof(window.external.receive) != 'undefined')
                    window.external.receive(html);
                else
                    document.body.innerHTML = html;

                function delay(ms) {
                    var completed = false;
                    setTimeout(function () {
                        completed = true;
                    }, ms);
                    while (!completed)
                        window.external.doEvents();
                }
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="douyu">
        <url><![CDATA[douyu\.com/group/video/(?<id>\d+)]]></url>
        <title><![CDATA[<title>([^_]+)[^<]*</title>]]></title>
        <content><![CDATA[(?is)video_str_duration":"(?<duration>[^"]+).*?title":"(?<title>[^"]+).*?post_id":"(?<url>[^"]+)]]></content>
        <baseUrl><![CDATA[https://yuba.douyu.com/p/]]></baseUrl>
        <jsCode><![CDATA[
            try {
                var group_id =  window.external.url.match(/video\/(\d+)/)[1];
                var html = '';
                //playback
                var url = 'https://yuba.douyu.com/wbapi/web/group/videolist?type=1&group_id=' + group_id + '&page=';
                var p = 1;
                while (true) {
                    var data = window.external.getHtmlCode(url + p);
                    if (data.indexOf('\"data\":[{') == -1)
                        break;

                    html += data;
                    p++;
                    window.external.doEvents();
                }
                //video
                p = 1;
                url = 'https://yuba.douyu.com/wbapi/web/group/videolist?type=2&group_id=' + group_id + '&page='
                while (true) {
                    var data = window.external.getHtmlCode(url + p);
                    if (data.indexOf('\"data\":[{') == -1)
                        break;

                    html += data;
                    p++;
                    window.external.doEvents();
                }

                html = '<title>' + document.title + '</title>$' + html;
                if (typeof(window.external.receive) != 'undefined')
                    window.external.receive(html);
                else
                    document.body.innerHTML = html;
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="douyu">
        <url><![CDATA[douyu\.com/author/(?<id>[^/]+)]]></url>
        <title><![CDATA[<title>([^_]+)[^<]*</title>]]></title>
        <content><![CDATA[(?is)hash_id":"(?<url>[^"]+).*?title":"(?<title>[^"]+).*?video_str_duration":"(?<duration>[^"]+)]]></content>
        <baseUrl><![CDATA[https://v.douyu.com/show/]]></baseUrl>
        <jsCode><![CDATA[
            try {
                //https://v.douyu.com/author/gKpdxql6oAaW
                var up_id = document.head.innerHTML.match(/upId:\s+'([^']+)/)[1];
                var html = '';
                //video
                var url = 'https://v.douyu.com/wgapi/vod/center/getAuthorVideosByNew?up_id=' + up_id + '&limit=30&page=';
                var p = 1;
                while (true) {
                    var data = window.external.getHtmlCode(url + p);
                    if (data.indexOf('\"videos\":[]') != -1)
                        break;

                    html += data;
                    p++;
                    window.external.doEvents();
                }
                //playback
                p = 1;
                var uid = document.head.innerHTML.match(/uid:\s+'([^']+)/)[1];
                url = 'https://v.douyu.com/wgapi/vod/center/getAuthorShowAndVideoListV1?limit=5&up_id=' + up_id + '&uid=' + uid + '&page=';
                while (true) {
                    var data = window.external.getHtmlCode(url + p);
                    if (data.indexOf('\"list\":[]') != -1)
                        break;

                    html += data;
                    p++;
                    window.external.doEvents();
                }

                html = '<title>' + document.title + '</title>$' + html;
                if (typeof(window.external.receive) != 'undefined')
                    window.external.receive(html);
                else
                    document.body.innerHTML = html;
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="douyu" watchList="true">
        <url><![CDATA[douyu\.com/show/(?<id>[^/?]+)\?ap=]]></url>
        <title><![CDATA[title:"([^"]+)]]></title>
        <content><![CDATA[(?is)v_title:"(?<title>.+?)",video_url:"(?<url>[^"]+)",duration:(?<duration>[^;]+)]]></content>
        <baseUrl><![CDATA[https://v.douyu.com/show/]]></baseUrl>
        <jsCode><![CDATA[
            try {
                //https://v.douyu.com/show/Kp1QM843bq3Mk4bj?ap=1
                var href = window.location.href;
                var vid = href.match(/show\/([^/?]+)/)[1];
                var up_id = window.$DATA.ROOM.up_id;
                var api_url = 'https://v.douyu.com/wgapi/vod/center/getShowReplayList?vid=' + vid + '&up_id=' + up_id;
                var data = window.external.getHtmlCode(api_url, href);
                var jo = JSON.parse(data);
                var title = '';
                var html = '';
                if (jo.data.list && jo.data.list.length != 0) {
                    title = '直播录像 ' + jo.data.date;
                    for (var idx in jo.data.list) {
                        var item = jo.data.list[idx];
                        html += 'v_title:\"' + item.show_remark + '\",video_url:\"' + item.hash_id + '\",duration:' + item.video_duration + ';\r\n';
                    }
                }

                html = 'title:\"' + title + '\"$' + html;
                if (typeof(window.external.receive) != 'undefined')
                    window.external.receive(html);
                else
                    document.body.innerHTML = html;
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="yy">
        <url><![CDATA[yy\.com/u/videos/(?<id>[^/]+)]]></url>
        <title><![CDATA[title:"([^"]+)]]></title>
        <content><![CDATA[(?is)imageUrl":"//(?<thumbnail>[^"]+)","title":"(?<title>[^"]+).*?duration":"(?<duration>[^"]+).*?playUrl":"(?<url>[^"]+)]]></content>
        <baseUrl><![CDATA[https://www.yy.com]]></baseUrl>
        <jsCode><![CDATA[
            try {
                var html = 'title:\"' + window.__INITIAL_STATE__.headerInfo.data.topData.baseUserInfo.anchorName + '\"$';
                var yn = window.__INITIAL_STATE__.headerInfo.data.yyNum;
                for (let i = 1; i <= 3; i++) {
                    var p = 1;
                    while (true) {
                        url = 'https://www.yy.com/u/videos/' + i + '/' + yn + '/' + p + '/30'
                        var data = window.external.getHtmlCode(url);
                        if (data.indexOf('tagType') == -1)
                            break;

                        html += data;
                        p++;
                        window.external.doEvents();
                    }
                }

                if (typeof(window.external.receive) != 'undefined')
                    window.external.receive(html);
                else
                    document.body.innerHTML = html;
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="ixigua" delay="7500">
        <url><![CDATA[ixigua\.com/home/(?<id>\d+)]]></url>
        <title><![CDATA[title:"([^"]+)]]></title>
        <content><![CDATA[(?is)v_title:"(?<title>.+?)",video_url:"(?<url>[^"]+)",duration:(?<duration>[^,]+),date:(?<date>[^;]+)]]></content>
        <ckSign><![CDATA[ttwid]]></ckSign>
        <startPage><![CDATA[startPage:([^,]+)]]></startPage>
        <hasMore><![CDATA[hasMore:([^,]+)]]></hasMore>
        <jsCode><![CDATA[
            try {
                //https://www.ixigua.com/home/50676556929/
                //https://www.ixigua.com/home/52773485452/
                //https://www.ixigua.com/home/54205738157/video/?preActiveKey=hotsoon
                //https://www.ixigua.com/home/111184831526/ 其title中有引号
                var title = '';
                var html = '';
                var lastStart = 0;
                var hasMore = false;
                //yz...
                if (typeof(window.external.gcv) != 'undefined' && window.external.gcv('Download', 'XGYizhuan', 'false').toLowerCase() == 'true') {
                    title = window._SSR_HYDRATED_DATA ? window._SSR_HYDRATED_DATA.AuthorDetailInfo.name : '';
                    var headers = 'Content-Type: application/x-www-form-urlencoded\r\nUser-Agent: ' + navigator.userAgent;
                    var uid = window._SSR_HYDRATED_DATA ? window._SSR_HYDRATED_DATA.AuthorDetailInfo.user_id : window.location.href.match(/home\/([^\/]+)/)[1];
                    var api_url = 'https://www.yizhuan5.com/tools/gallery/authorarticleVideoSearch';
                    var args = 'apid=5&authoridstr=' + uid + '&type=video&PageSize=200&PageIndex=';
                    var p = 1;
                    while (true) {
                        var data = window.external.getPostResultEx(api_url, args + p, headers, 200);
                        if (data.indexOf('hmcturl') == -1)
                            break;

                        var jo = JSON.parse(data);
                        for (var idx in jo.Data.List) {
                            var item = jo.Data.List[idx];
                            //有重复项
                            if (html.indexOf('item.hmcttitle') != -1)
                                continue;
                            if (!title)
                                title = item.hmctsource;
                            html += 'v_title:\"' + item.hmcttitle + '\",video_url:\"https://www.yizhuan5.com/Common/Tool/ToUrl?data=' + encodeURIComponent(item.hmcturl) + '\",duration:' + 0 + ',date:' + item.hmctdate + ';\r\n';
                        }
                        p++;
                        window.external.doEvents();
                    }
                    html = 'title:\"' + title + '\"$' + html;
                }

                if (!html) {
                    var st = '';
                    var hot_list = false;
                    var base_url = '';
                    var author = '';
                    var type = 'video';
                    var entries = window.performance.getEntriesByType('resource');
                    for (let i = 0; i <= entries.length - 1; i++) {
                        var e = entries[i].name;
                        if (e.indexOf('https://www.ixigua.com/api/videov2/author/') != -1) {
                            st = e.match(/_signature=([^&]+)/)[1];
                            base_url = e.substr(0, e.indexOf('?'));
                            author = e.match(/\?([^&=]+)/)[1];
                            hot_list = e.indexOf('offset=') != -1;
                            type = e.match(/type=([^&]+)/) ? e.match(/type=([^&]+)/)[1] : type;
                            break;
                        }
                    }

                    if (st) {
                        var aid = window.external.url.match(/home\/([^/]+)/)[1];
                        var api_url = base_url + '?_signature=' + st + '&' + author + '=' + aid + '&type=' + type;
                        api_url += hot_list ? '&limit=30&offset=' : '&max_time=';
                        html = 'title:\"' + window._SSR_HYDRATED_DATA.AuthorDetailInfo.name + '\"$';
                        var cookies = window.external.getCookie(window.external.url, true);
                        if (cookies.indexOf('ttwid') == -1)
                            cookies = window.external.getCookie(window.external.url);
                        if (cookies.indexOf('ttwid') != -1) {
                            cookies = cookies.substr(cookies.lastIndexOf('ttwid'));
                            var ttwid = cookies.match(/ttwid=([^;]+)/)[1];
                            cookies = 'ttwid=' + encodeURI(ttwid);
                        }
                        var headers = 'Referer: ' + window.external.url + '\r\nCookie: ' + cookies;
                        var mt = (window.external.sp != undefined) ? window.external.sp : 0;
                        var offset = (window.external.sp != undefined) ? parseInt(window.external.sp) : 0;
                        var pmax = (window.external.sp != undefined) ? 19 : 199;
                        var p = 0;
                        //到90就停止了...
                        while (true) {
                            if (p > pmax)
                                break;
                            var url = hot_list ? api_url + offset + '&maxBehotTime=' + mt : api_url + mt;
                            var data = window.external.getHtmlCodeEx(url, headers, 200);
                            var jo = JSON.parse(data);
                            var ds = jo.data.data || jo.data;
                            if (!ds)
                                break;

                            if (ds.videoList)
                                ds = ds.videoList;
                            for (let i = 0; i <= ds.length - 1; i++)
                                html += 'v_title:\"' + ds[i].title + '\",video_url:\"https://www.ixigua.com/' + ds[i].item_id + '\",duration:' + ds[i].video_duration + ',date:' + ds[i].publish_time + ';\r\n';
                            if (hot_list && data.indexOf('videoList\":[]') != -1 || !hot_list && !jo.data.has_more) {
                                hasMore = false;
                                break;
                            }

                            if (hot_list)
                                offset += 30;
                            mt = ds[ds.length - 1].behot_time;
                            p++;
                            hasMore = true;
                            lastStart = hot_list ? offset : mt;
                            window.external.doEvents();
                        }
                    }
                    else if (window.location.href.match(/home\/(\d+)/)) {
                        var uid = window.location.href.match(/home\/(\d+)/)[1];
                        var api_url = 'https://m.ixigua.com/video/app/user/home/?to_user_id=' + uid + '&format=json&preActiveKey=' + type + '&max_behot_time=';
                        var mbt = (window.external.sp != undefined) ? window.external.sp : 0;
                        var pmax = (window.external.sp != undefined) ? 19 : 199;
                        var p = 0;
                        while (true) {
                            if (p > pmax)
                                break;
                            var data = window.external.getHtmlCode(api_url + mbt, window.location.href, true, 200);
                            if (!data) {
                                var api_url = 'https://api3-normal-c-lq.ixigua.com/video/app/user/videolist/v2/?to_user_id=' + uid + '&tab=' + type + '&max_behot_time=';
                                data = window.external.getHtmlCode(api_url + mbt, window.location.href, true, 200);
                            }
                            if (!data)
                                break;

                            var jo = JSON.parse(data);
                            if (!title && jo.user_info)
                                title = jo.user_info.name;
                            if (jo.data.length != 0) {
                                mbt = jo.data[jo.data.length - 1].behot_time;
                                for (var idx in jo.data) {
                                    var item = jo.data[idx];
                                    if (!title && item.user_info)
                                        title = item.user_info.name;
                                    html += 'v_title:\"' + item.title + '\",video_url:\"https://www.ixigua.com/' + item.group_id_str + '\",duration:' + item.video_duration + ',date:' + item.publish_time + ';\r\n';
                                }
                            }
                            if (!jo.has_more) {
                                hasMore = false;
                                break;
                            }

                            p++;
                            hasMore = true;
                            lastStart = hot_list ? offset : mt;
                            window.external.doEvents();
                        }
                        html = 'title:\"' + title + '\"$' + html;
                    }
                }

                if (hasMore)
                    html = 'startPage:' + lastStart + ',hasMore:' + hasMore + ',' + html;
                //避免下句赋值过慢，快速返回
                if (typeof(window.external.receive) != 'undefined')
                    window.external.receive(html);
                else {
                    document.head.innerHTML = '';
                    document.body.innerHTML = html;
                }
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="ixigua" watchList="true" delay="7500">
        <url><![CDATA[ixigua\.com/(?<id>\d+)\?id=\d+]]></url>
        <title><![CDATA[title:"([^"]+)]]></title>
        <content><![CDATA[(?is)v_title:"(?<title>[^"]+)",name:"(?<describe>[^"]*)",video_url:"(?<url>[^"]+)",duration:(?<duration>[^;]+)]]></content>
        <baseUrl><![CDATA[https://www.ixigua.com/]]></baseUrl>
        <ckSign><![CDATA[ttwid]]></ckSign>
        <jsCode><![CDATA[
            try {
                //https://www.ixigua.com/6824723442495914509?id=6824735584565592590&logTag=jS-jQskpBAcMsXOQAVIAi
                var title = document.title;
                var sd = window._SSR_HYDRATED_DATA;
                var pd = undefined;
                if (sd && sd.anyVideo) {
                    pd = sd.anyVideo.gidInformation.packerData;
                    title = pd.albumInfo ? pd.albumInfo.title : (pd.pSeries ? pd.pSeries.seriesInfo.title : document.title);
                }
                var api_url = '';
                var entries = window.performance.getEntriesByType('resource');
                for (let i = 0; i <= entries.length - 1; i++) {
                    if (entries[i].name.indexOf('api/albumv2/details?') != -1 || entries[i].name.indexOf('api/videov2/pseries_more_v2?') != -1) {
                        api_url = entries[i].name;
                        break;
                    }
                }

                var html = '';
                if (api_url) {
                    //https://www.ixigua.com/6841411932574974477?id=6841753862622151175 一次即可取完
                    if (api_url.indexOf('api/albumv2/details?') != -1) {
                        var data = window.external.getHtmlCode(api_url, window.location.href);
                        var jo = JSON.parse(data);
                        var pl = jo.data.playlist;
                        for (let i = 0; i <= pl.length - 1; i++)
                            html += 'v_title:\"' + pl[i].title + '\",name:\"' + pl[i].name + '\",video_url:\"' + pl[i].albumId + '?id=' + pl[i].episodeId + '\",duration:' + pl[i].videoInfo.duration + ';\r\n';
                    }
                    //https://www.ixigua.com/6748995510029255172?id=6748993579483398670 分多次
                    else {
                        api_url = api_url.replace(/&rank=\d+/, '') + '&rank=';
                        var r = 0;
                        while (true) {
                            var data = window.external.getHtmlCode(api_url + r, window.location.href);
                            if (data.indexOf('\"data\":[]') != -1)
                                 break;

                            var jo = JSON.parse(data);
                            var pl = jo.data;
                            for (let i = 0; i <= pl.length - 1; i++)
                                html += 'v_title:\"' + pl[i].title + '\",name:\"' + pl[i].name + '\",video_url:\"' + pl[i].item_id + '\",duration:' + pl[i].video_duration + ';\r\n';
                            r += 30;
                            window.external.doEvents();
                        }
                    }
                }
                if (!html && pd) {
                    var pl = pd.playlist || pd.pSeries.videoList;
                    for (let i = 0; i <= pl.length - 1; i++) {
                        var video = pl[i];
                        var url = video.albumId ? video.albumId + '?id=' + video.episodeId : video.log_pb.album_id + '?id=' + video.item_id;
                        var duration = video.video_duration || video.videoInfo.duration;
                        html += 'v_title:\"' + video.title + '\",name:\"' + video.name + '\",video_url:\"' + url + '\",duration:' + duration + ';\r\n';
                    }
                }

                html = 'title:\"' + title + '\"$' + html;
                //https://www.ixigua.com/6756201119371756039?id=6752506125205111308&logTag=B4C6R_Vhb_mOGqh63kP7Z...为避免其大于号>、小于号影响，置innerText
                document.body.innerText = html;
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="ixigua" watchList="true" redirect="true" delay="500">
        <url><![CDATA[ixigua\.com/user_playlist/(?<id>\d+)]]></url>
        <title><![CDATA[]]></title>
        <content><![CDATA[]]></content>
        <baseUrl><![CDATA[]]></baseUrl>
        <jsCode><![CDATA[
            try {
                //https://www.ixigua.com/user_playlist/67211827964?rank=1&offset=0&logTag=8T0chWtPP2d_w9MVrHmRW->https://www.ixigua.com/home/67211827964
                var uid = window.external.url.match(/user_playlist\/([^/?]+)/)[1];
                document.body.innerHTML = 'cr_playlist_url=https://www.ixigua.com/home/' + uid + '$';
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="ixigua" delay="7500">
        <url><![CDATA[ixigua\.com/pseries/(?<id>\d+)(?:$|/)]]></url>
        <title><![CDATA[title:"([^"]+)]]></title>
        <content><![CDATA[(?is)v_title:"(?<title>[^"]+)",video_url:"(?<url>[^"]+)",duration:(?<duration>[^;]+)]]></content>
        <baseUrl><![CDATA[https://www.ixigua.com/]]></baseUrl>
        <ckSign><![CDATA[ttwid]]></ckSign>
        <jsCode><![CDATA[
            try {
                var pid = window._SSR_HYDRATED_DATA.Projection.video.pseries_id;
                var st = '';
                var base_url = '';
                var entries = window.performance.getEntriesByType('resource');
                for (let i = 0; i <= entries.length - 1; i++) {
                    if (entries[i].name.indexOf('/api/videov2/pseries_more_v2') != -1) {
                        base_url = entries[i].name;
                        break;
                    }
                }

                var title = document.getElementsByClassName('projection-series-header-title')[0].innerText;
                var api_url = base_url.replace('&rank=0', '') + '&rank=';
                var html = 'title:\"' + title + '\"$';
                var offset = 0;
                while (true) {
                    var data = window.external.getHtmlCode(api_url + offset, window.location.href);
                    var jo = JSON.parse(data);
                    var ds = jo.data;
                    for (let i = 0; i <= ds.length - 1; i++)
                        html += 'v_title:\"' + ds[i].title + '\",video_url:\"' + ds[i].item_id + '\",duration:' + ds[i].video_duration + ';\r\n';
                    if (data.indexOf('\"data\":[]') != -1 )
                        break;

                    offset += 30;
                    window.external.doEvents();
                }

                //避免下句赋值过慢，快速返回
                if (typeof(window.external.receive) != 'undefined')
                    window.external.receive(html);
                else {
                    document.head.innerHTML = '';
                    document.body.innerHTML = html;
                }
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="ixigua" watchList="true" delay="7500">
        <url><![CDATA[ixigua\.com/cinema/album/(?<id>\w+)_\w+]]></url>
        <title><![CDATA[title:"([^"]+)]]></title>
        <content><![CDATA[(?is)[\[,]{"episodeId":"(?<url>[^"]+).*?title":"(?<title>[^"]+).*?Duration":(?<duration>[^,]+).*?name":"(?<describe>[^"]+)]]></content>
        <baseUrl><![CDATA[https://www.ixigua.com/]]></baseUrl>
        <ckSign><![CDATA[ttwid]]></ckSign>
        <jsCode><![CDATA[
            try {
                //https://www.ixigua.com/cinema/album/7NXazgvbBlb/?logTag=kXmGtga61pAJbcXmxQlGQ 比如这样，它就不属于列表
                var title = document.getElementsByClassName('ProgramGuide__title')[0].innerText;
                var html = 'title:\"' + title + '\"$' + JSON.stringify(window.anyVideo.gidInformation.packerData.playlist);

                //避免下句赋值过慢，快速返回
                if (typeof(window.external.receive) != 'undefined')
                    window.external.receive(html);
                else {
                    document.head.innerHTML = '';
                    document.body.innerHTML = html;
                }
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="ixigua" delay="2500">
        <url><![CDATA[ixigua\.com/search/(?<id>[^/]+)]]></url>
        <title><![CDATA[title:"([^"]+)]]></title>
        <content><![CDATA[(?is)\{.*?title":"(?<title>[^"]+).*?image":"(?<thumbnail>[^"]+).*?group_id":"(?<url>[^"]+)]]></content>
        <baseUrl><![CDATA[https://www.ixigua.com/]]></baseUrl>
        <ckSign><![CDATA[ttwid]]></ckSign>
        <jsCode><![CDATA[
            try {
                var sk = window.external.url.match(/search\/([^/]+)/)[1];
                var api_url = 'https://www.ixigua.com/api/searchv2/complex/' + sk + '/';
                var html = 'title:\"' + decodeURI(sk) + '\"';
                var offset = 0;
                var index = 0;
                while (true) {
                    if (index > 99)
                        break;

                    var data = window.external.getHtmlCode(api_url + offset, window.location.href);
                    html += data;
                    var jo = JSON.parse(data);
                    if (!jo.data.has_more)
                        break;

                    offset += jo.data.count;
                    index++;
                    window.external.doEvents();
                }

                if (typeof(window.external.receive) != 'undefined')
                    window.external.receive(html);
                else
                    document.body.innerHTML = html;
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="huya">
        <url><![CDATA[huya\.com/u/(?<id>\d+)/(?:live)?video\.html?]]></url>
        <title><![CDATA[title:"([^"]+)]]></title>
        <content><![CDATA[(?is)<li[^>]*>\s+<a\s+title="(?<title>[^"]+).*?href="(?<url>[^"]+).*?cover-duration">(?<duration>[^<]+).*?</li>]]></content>
        <baseUrl><![CDATA[https://v.huya.com]]></baseUrl>
        <total><![CDATA[total:([^,]+)]]></total>
        <startPage><![CDATA[startPage:([^,]+)]]></startPage>
        <hasMore><![CDATA[hasMore:([^,]+)]]></hasMore>
        <jsCode><![CDATA[
            try {
                //https://v.huya.com/u/1466346678/video.html
                //不取全，让它重新解析，以避免下载过程有的会卡住问题
                var html = 'title:\"' + document.getElementsByClassName('detail-nick')[0].firstChild.innerText + ' ' + document.getElementsByClassName('statpid selected')[0].innerText.replace(/\(\d+\)/, '') + '\"$';
                //若有?，则取其当前页
                if (window.location.href.indexOf('p=') == -1) {
                    var baseUrl = window.location.href;
                    var ul = document.getElementsByClassName('user-paginator')[0].firstChild;
                    var pageNumber = parseInt(ul.children[ul.children.length - 2].innerText);
                    var p = parseInt(window.external.sp) || 1;
                    var pmax = (window.external.sp != undefined) ? 49 : 99;
                    var pidx = 0;
                    var total = (document.getElementsByClassName('count').length != 0) ? document.getElementsByClassName('count')[0].innerText.match(/\d+/)[0] : 0;
                    var hasMore = false;
                    while (true) {
                        if (pidx > pmax || p > pageNumber) {
                            hasMore = (p <= pageNumber);
                            break;
                        }

                        html += window.external.getHtmlCode(baseUrl + '?p=' + p);
                        p++;
                        pidx++;
                        hasMore = true;
                        window.external.doEvents();
                    }
                    html = 'total:' + total + ',startPage:' + p + ',hasMore:' + hasMore + ',' + html;
                }
                else
                    html += document.body.innerHTML;

                if (typeof(window.external.receive) != 'undefined')
                    window.external.receive(html);
                else
                    document.body.innerHTML = html;
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="ximalaya" watchList="true" crpj="true" delay="2500">
        <url><![CDATA[ximalaya\.com/.*?/(?<id>\d+)/\d+]]></url>
        <title><![CDATA[albumTitle":"([^"]+)]]></title>
        <content><![CDATA[(?is)"title":"(?<title>[^"]+).*?url":"(?<url>[^"]+).*?duration":(?<duration>[^,]+)]]></content>
        <baseUrl><![CDATA[https://www.ximalaya.com]]></baseUrl>
        <headers><![CDATA[User-Agent: None]]></headers>
        <ckSign><![CDATA[1&_token]]></ckSign>
        <jsCode><![CDATA[
            try {
                var m = document.body.innerHTML.match(/<h6[^>]+>([^<]+)<\/h6>/);
                var albumTitle = '\"albumTitle\":\"' + (m ? m[1] : document.title) + '\"';
                m = window.location.href.match(/\/(\d+)/);
                var albumId = parseInt(m[1]);
                var p = 1;
                var html = albumTitle + '$';
                while (true) {
                    var st = window.external.getHtmlCode('https://www.ximalaya.com/revision/time');
                    var xs = md5('himalaya-' + st) + '(' + u(100) + ')' + st + '(' + u(100) + ')' + Date.now();
                    var headers = 'xm-sign: ' + xs;
                    var url = 'https://www.ximalaya.com/revision/album/v1/getTracksList?albumId=' + albumId + '&pageNum=' + p;
                    var data = window.external.getHtmlCodeEx(url, headers);
                    var jo = JSON.parse(data);
                    if (jo.data.tracks.length == 0)
                        break;

                    html += data;
                    p++;
                    window.external.doEvents();
                }
                if (typeof(window.external.receive) != 'undefined')
                    window.external.receive(html);
                else
                    document.body.innerHTML = html;

                function u(t) {
                    return ~~(Math.random() * t);
                }
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="ximalaya" crpj="true" delay="2500">
        <url><![CDATA[ximalaya\.com/[a-z]+/(?<id>\d+)/(?:p|$)]]></url>
        <title><![CDATA[albumTitle":"([^"]+)]]></title>
        <content><![CDATA[(?is)"title":"(?<title>[^"]+).*?url":"(?<url>[^"]+).*?duration":(?<duration>[^,]+)]]></content>
        <baseUrl><![CDATA[https://www.ximalaya.com]]></baseUrl>
        <jsCode><![CDATA[
            try {
                //https://www.ximalaya.com/youshengshu/4756811/
                var m = document.body.innerHTML.match(/<h1[^>]+>([^<]+)<\/h1>/);
                var albumTitle = '\"albumTitle\":\"' + (m ? m[1] : document.title) + '\"';
                m = window.location.href.match(/\/(\d+)/);
                var albumId = window.location.href.match(/\/(\d+)/)[1];
                var p = 1;
                var html = albumTitle + '$';
                while (true) {
                    var st = window.external.getHtmlCode('https://www.ximalaya.com/revision/time');
                    var xs = md5('himalaya-' + st) + '(' + u(100) + ')' + st + '(' + u(100) + ')' + Date.now();
                    var headers = 'xm-sign: ' + xs;
                    var url = 'https://www.ximalaya.com/revision/album/v1/getTracksList?albumId=' + albumId + '&pageNum=' + p;
                    var data = window.external.getHtmlCodeEx(url, headers);
                    var jo = JSON.parse(data);
                    if (jo.data.tracks.length == 0)
                        break;

                    html += data;
                    p++;
                    window.external.doEvents();
                }
                if (typeof(window.external.receive) != 'undefined')
                    window.external.receive(html);
                else
                    document.body.innerHTML = html;

                function u(t) {
                    return ~~(Math.random() * t);
                }
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="lrts" crpj="true" delay="2500">
        <url><![CDATA[lrts\.\w+/book/(?<id>\d+)]]></url>
        <title><![CDATA[<h1[^>]+>([^<]+)]]></title>
        <content><![CDATA[(?is)v_title:"(?<title>[^"]+)",media_url:"(?<url>[^"]+)",duration:(?<duration>[^;]+)]]></content>
        <ckSign><![CDATA[sid]]></ckSign>
        <jsCode><![CDATA[
            try {
                //http://www.lrts.me/book/79696383
                var href = window.location.href;
                var id = href.match(/book\/(\d+)/)[1];
                var p = 1;
                var html = '';
                while (true) {
                    var api_url = 'http://m.lrts.me/ajax/getBookMenu?bookId=' + id + '&pageSize=5000&sortType=0&pageNum=' + p;
                    var data = window.external.getHtmlCode(api_url, href);
                    var jo = JSON.parse(data);
                    if (!jo.list || jo.list.length == 0)
                        break;

                    for (var idx in jo.list) {
                        var item = jo.list[idx];
                        var media_url = item.path || 'http://www.lrts.me/book/' + id + '/' + item.section;
                        html += 'v_title:\"' + item.name + '\",media_url:\"' + media_url + '\",duration:' + item.length + ';\r\n';
                    }
                    p++;
                    window.external.doEvents();
                }
                html = document.getElementsByTagName('h1')[0].outerHTML + '$' + html;
                if (typeof(window.external.receive) != 'undefined')
                    window.external.receive(html);
                else
                    document.body.innerHTML = html;

                function getMediaUrl(id, section) {
                    var base_url = 'http://m.lrts.me/ajax/getPlayPath?entityId=' + id + '&entityType=3&opType=1&type=0&sections=';
                    var data = window.external.getHtmlCode(base_url + '[' + section + ']');
                    if (!data)
                        return '';

                    var jo = JSON.parse(data);
                    if (jo.list && jo.list.length != 0)
                        return jo.list[0].path;
                    return '';
                }
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="idaddy" crpj="true">
        <url><![CDATA[idaddy\.cn/share/show/(?<id>[^/\?]+)]]></url>
        <title><![CDATA[shareTitle\s+=\s+"([^"]+)"]]></title>
        <content><![CDATA[(?is)<li\s+id=.*?src="(?<url>[^"]+).*?h2>(?<title>[^<]+).*?font>(?<duration>[^<]+)]]></content>
        <jsCode><![CDATA[
            try {
                var lis = document.getElementsByTagName('li');
                for (let i = 0; i <= lis.length - 1; i++) {
                    var li = lis[i];
                    if (!li.id)
                        continue;
                    var audio = document.getElementById(li.dataset.id);
                    if (audio.src)
                        li.setAttribute('src', audio.src + '#.mp3');
                }
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="douyin" crpj="true" aria2c="true" speed="500k">
        <url><![CDATA[douyin\.com/share/user/(?<id>[^/\?]+)]]></url>
        <title><![CDATA[title:"([^"]+)]]></title>
        <content><![CDATA[(?is)id=(?<id>[^,]+),v_title:"(?<title>[^"]*)",thumbnail:(?<thumbnail>[^,]*),duration:(?<duration>[^,]*),video_url:(?<url>[^,]*),backup_url=(?<burl>[^;]*)]]></content>
        <headers><![CDATA[User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1]]></headers>
        <jsCode><![CDATA[
            try {
                //https://v.douyin.com/JukWGyh/
                //https://v.douyin.com/J4RaCm1/
                var uid = window.location.href.match(/user\/([^\/?]+)/)[1]
                var max_cursor = 0;
                var args = 'user_id=' + uid + '&sec_uid=&count=21&aid=1128&_signature=&dytk=&max_cursor=';
                var api_url = 'https://aweme-hl.snssdk.com/web/api/v2/aweme/post/?' + args;
                var title = '';
                var html = '';
                var p = 0;
                var delay = 0;
                if (!html && uid) {
                    api_url = '';
                    var entries = window.performance.getEntriesByType('resource');
                    for (let i = 0; i <= entries.length - 1; i++) {
                        var e = entries[i].name;
                        //https://v.douyin.com/J9mh9HB/->web/api/v2/music/list/
                        if (e.indexOf('web/api/v2/') != -1 && e.indexOf('&_signature') != -1) {
                            api_url = e.replace('music/list/original/', 'aweme/post/');
                            api_url = api_url.replace('?', '?uid=' + uid + '&').replace('&max_cursor=0', '').replace('&cursor=0', '') + '&max_cursor=';
                            break;
                        }
                    }

                    if (api_url) {
                        max_cursor = 0;
                        var headers = 'User-Agent: ' + navigator.userAgent + '\r\nReferer: ' + window.external.url;
                        p = 0;
                        while (true) {
                            var data = window.external.getHtmlCodeEx(api_url + max_cursor, headers, delay);
                            var jo = JSON.parse(data);
                            //完了... {"has_more":false,"extra":{"now":1611377256000,"logid":"2021012312473601019806015130015D27"},"status_code":0,"aweme_list":[],"max_cursor":0,"min_cursor":1611377256000}
                            if (jo.has_more === false && jo.aweme_list.length == 0)
                                break;
                            max_cursor = jo.max_cursor || max_cursor;
                            //空数据...{"status_code": 0, "has_more": 0, "max_cursor": 0, "min_cursor": 0, "aweme_list": []}
                            if (jo.aweme_list.length == 0) {
                                delay = 0;
                                continue;
                            }

                            if (!title && jo.aweme_list.length != 0)
                                title = jo.aweme_list[0].author.nickname;
                            //一次20多个
                            for (var idx in jo.aweme_list) {
                                var aweme = jo.aweme_list[idx];
                                //有些，没有video
                                if (!aweme.video)
                                    continue;
                                var mid = aweme.music ? aweme.music.id : 0;
                                var video_url = 'https://www.iesdouyin.com/share/video/' + aweme.aweme_id + '/?region=CN&mid=' + mid;
                                var media_url = (idx % 2 == 0) ? aweme.video.download_addr.url_list[0] : aweme.video.play_addr.url_list[0];
                                media_url = media_url.replace('watermark=1', 'watermark=0').replace('playwm', 'play');
                                //不求其跳转后地址了，太慢而导致解析失败，希望加限速好些
                                var vt = aweme.desc || aweme.aweme_id;
                                var thumbnail = aweme.video.cover.url_list[0];
                                var duration = aweme.video.duration / 1000;
                                html += 'id=' + aweme.aweme_id + ',v_title:\"' + vt + '\",thumbnail:' + thumbnail + ',duration:' + duration + ',video_url:' + video_url + ',backup_url=' + media_url + ';\r\n';
                            }
                            p++;
                            delay = 200;

                            //没有了..."has_more":false,...若超过199次，返回
                            if (jo.has_more === false || p > 199)
                                break;
                            window.external.doEvents();
                        }
                    }

                    if (!html && ais) {
                        args = ais + '&url=' + encodeURIComponent(window.location.href);
                        var data = window.external.getPostResult('https://api-sv.videoparse.cn/api/batch/getAuthorInfo', args, 'application/x-www-form-urlencoded');
                        data = data.replace(/\n/g, '');
                        var jo = JSON.parse(data);
                        if (jo.code == 0) {
                            title = jo.body.author.name;
                            args = ais + '&uid=' + jo.body.author.uid + '&platform=' + jo.body.platform + '&cursor=';
                            var max_cursor = 0;
                            while (true) {
                                data = window.external.getPostResult('https://api-sv.videoparse.cn/api/batch/getList', args + max_cursor, 'application/x-www-form-urlencoded');
                                jo = JSON.parse(data);
                                if (jo.code != 0 || !jo.body.page.has_more)
                                    break;

                                max_cursor = jo.body.page.next_cursor;
                                for (var idx in jo.body.list) {
                                    var aweme = jo.body.list[idx].video_info;
                                    var vt = aweme.desc || aweme.url;
                                    html += 'id=' + aweme.aweme_id + ',v_title:\"' + vt + '\",thumbnail:' + aweme.cover + ',duration:0,video_url:' + aweme.url + '$';
                                }
                            }
                        }
                    }
                }

                if (!title)
                    title = document.title;
                html = 'title:\"' + title + '\"$' + html;
                if (typeof(window.external.receive) != 'undefined')
                    window.external.receive(html);
                else
                    document.body.innerHTML = html;
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="douyin" crpj="true">
        <url><![CDATA[douyin\.com/share/music/(?<id>[^/\?]+)]]></url>
        <title><![CDATA[title:"([^"]+)]]></title>
        <content><![CDATA[(?is)v_title:(?<title>[^,]*),thumbnail:(?<thumbnail>[^,]*),duration:(?<duration>[^,]*),video_url:(?<url>[^;]*)]]></content>
        <headers><![CDATA[User-Agent: None]]></headers>
        <baseUrl><![CDATA[https://www.iesdouyin.com/share/video/]]></baseUrl>
        <total><![CDATA[total:([^,]+)]]></total>
        <startPage><![CDATA[startPage:([^,]+)]]></startPage>
        <hasMore><![CDATA[hasMore:([^,]+)]]></hasMore>
        <jsCode><![CDATA[
            try {
                //https://www.iesdouyin.com/share/music/6763092917251754760
                var mid = window.location.href.match(/music\/([^\/?]+)/)[1];
                var args = 'music_id=' + mid + '&count=9&aid=1128&_signature=&cursor=';
                var api_url = 'https://www.iesdouyin.com/web/api/v2/music/list/aweme/?' + args;
                var title = document.body.innerHTML.match(/name\">\s+([^<]+)/)[1].trim();
                var html = '';
                var p = parseInt(window.external.sp) || 0;
                var pmax = (window.external.sp != undefined) ? 49 : 99;
                var pidx = 0;
                var total = 0;
                var hasMore = false;
                while (true) {
                    var data = window.external.getHtmlCode(api_url + p * 9);
                    var jo = JSON.parse(data);
                    if (jo.aweme_list.length != 0) {
                        for (var idx in jo.aweme_list) {
                            var aweme = jo.aweme_list[idx];
                            var mid = aweme.music ? aweme.music.id : 0;
                            html += 'v_title:' + aweme.desc + ',thumbnail:' + aweme.video.cover.url_list[0] + ',duration:' + aweme.video.duration / 1000 + ',video_url:' + aweme.aweme_id + '/?region=CN&mid=' + mid + ';\r\n';
                        }
                    }

                    if (!jo.has_more || pidx > pmax) {
                        hasMore = jo.has_more;
                        break;
                    }

                    pidx++;
                    p++;
                    hasMore = true;
                    window.external.doEvents();
                }

                if (!title)
                    title = document.title;
                html = 'title:\"' + title + '\"$' + html;
                html = 'total:' + total + ',startPage:' + p + ',hasMore:' + hasMore + ',' + html;
                if (typeof(window.external.receive) != 'undefined')
                    window.external.receive(html);
                else
                    document.body.innerHTML = html;
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="douyin" crpj="true">
        <url><![CDATA[douyin\.com/share/challenge/(?<id>[^/\?]+)]]></url>
        <title><![CDATA[title:"([^"]+)]]></title>
        <content><![CDATA[(?is)v_title:(?<title>[^,]*),thumbnail:(?<thumbnail>[^,]*),duration:(?<duration>[^,]*),video_url:(?<url>[^;]*)]]></content>
        <headers><![CDATA[User-Agent: None]]></headers>
        <baseUrl><![CDATA[https://www.iesdouyin.com/share/video/]]></baseUrl>
        <total><![CDATA[total:([^,]+)]]></total>
        <startPage><![CDATA[startPage:([^,]+)]]></startPage>
        <hasMore><![CDATA[hasMore:([^,]+)]]></hasMore>
        <jsCode><![CDATA[
            try {
                //https://www.iesdouyin.com/share/challenge/1570007554746370
                var ch_id = window.location.href.match(/challenge\/([^\/?]+)/)[1];
                var args = 'ch_id=' + ch_id + '&count=9&aid=1128&_signature=&cursor=';
                var api_url = 'https://aweme-hl.snssdk.com/web/api/v2/challenge/aweme/?' + args;
                var title = '';
                var html = '';
                var p = parseInt(window.external.sp) || 0;
                var pmax = (window.external.sp != undefined) ? 49 : 99;
                var pidx = 0;
                var total = 0;
                var hasMore = false;
                while (true) {
                    var data = window.external.getHtmlCode(api_url + p * 9);
                    var jo = JSON.parse(data);
                    if (!title && jo.aweme_list.length != 0)
                        title = jo.aweme_list[0].cha_list[0].cha_name;
                    if (jo.aweme_list.length != 0) {
                        for (var idx in jo.aweme_list) {
                            var aweme = jo.aweme_list[idx];
                            var mid = aweme.music ? aweme.music.id : 0;
                            html += 'v_title:' + aweme.desc + ',thumbnail:' + aweme.video.cover.url_list[0] + ',duration:' + aweme.video.duration / 1000 + ',video_url:' + aweme.aweme_id + '/?region=CN&mid=' + mid + ';\r\n';
                        }
                    }

                    if (!jo.has_more || pidx > pmax) {
                        hasMore = jo.has_more;
                        break;
                    }

                    pidx++;
                    p++;
                    hasMore = true;
                    window.external.doEvents();
                }

                if (!title)
                    title = document.title;
                html = 'title:\"' + title + '\"$' + html;
                html = 'total:' + total + ',startPage:' + p + ',hasMore:' + hasMore + ',' + html;
                if (typeof(window.external.receive) != 'undefined')
                    window.external.receive(html);
                else
                    document.body.innerHTML = html;
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="douyin" crpj="true">
        <url><![CDATA[douyin\.com/share/mix/detail/(?<id>[^/\?]+)]]></url>
        <title><![CDATA[title:"([^"]+)]]></title>
        <content><![CDATA[(?is)v_title:(?<title>[^,]*),thumbnail:(?<thumbnail>[^,]*),duration:(?<duration>[^,]*),video_url:(?<url>[^;]*)]]></content>
        <headers><![CDATA[User-Agent: None]]></headers>
        <baseUrl><![CDATA[https://www.iesdouyin.com/share/video/]]></baseUrl>
        <total><![CDATA[total:([^,]+)]]></total>
        <startPage><![CDATA[startPage:([^,]+)]]></startPage>
        <hasMore><![CDATA[hasMore:([^,]+)]]></hasMore>
        <jsCode><![CDATA[
            try {
                //https://www.iesdouyin.com/share/mix/detail/6896474620786903053
                var mix_id = window.location.href.match(/mix\/detail\/([^\/?]+)/)[1];
                var args = 'mix_id=' + mix_id + '&count=10&cursor=';
                var api_url = 'https://www.iesdouyin.com/web/api/mix/item/list/?' + args;
                var title = '';
                var html = '';
                var p = parseInt(window.external.sp) || 0;
                var pmax = (window.external.sp != undefined) ? 49 : 99;
                var pidx = 0;
                var total = 0;
                var hasMore = false;
                while (true) {
                    var data = window.external.getHtmlCode(api_url + p * 10);
                    var jo = JSON.parse(data);
                    if (!title && jo.aweme_list.length != 0)
                        title = jo.aweme_list[0].mix_info.mix_name;
                    if (jo.aweme_list.length != 0) {
                        for (var idx in jo.aweme_list) {
                            var aweme = jo.aweme_list[idx];
                            var mid = aweme.music ? aweme.music.id : 0;
                            html += 'v_title:' + aweme.desc + ',thumbnail:' + aweme.video.cover.url_list[0] + ',duration:' + aweme.video.duration / 1000 + ',video_url:' + aweme.aweme_id + '/?region=CN&mid=' + mid + ';\r\n';
                        }
                    }

                    if (!jo.has_more || pidx > pmax) {
                        hasMore = jo.has_more;
                        break;
                    }

                    pidx++;
                    p++;
                    hasMore = true;
                    window.external.doEvents();
                }

                if (!title)
                    title = document.title;
                html = 'title:\"' + title + '\"$' + html;
                html = 'total:' + total + ',startPage:' + p + ',hasMore:' + hasMore + ',' + html;
                if (typeof(window.external.receive) != 'undefined')
                    window.external.receive(html);
                else
                    document.body.innerHTML = html;
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="tiktok" crpj="true">
        <url><![CDATA[tiktok\.com/(?:@(?<id>[^/\?]+)(?:\?|$)|.*?/use?r/(?<id>[^./]+))]]></url>
        <title><![CDATA[title:"([^"]+)]]></title>
        <content><![CDATA[(?is)v_title:"(?<title>[^"]*)",url:"(?<url>[^"]+)",duration:(?<duration>[^,]+),date:(?<date>[^;]+)]]></content>
        <ckSign><![CDATA[s_v_web_id]]></ckSign>
        <jsCode><![CDATA[
            try {
                //https://www.tiktok.com/@michael.jackton.official?
                //https://vm.tiktok.com/Wo9Ag6/->https://m.tiktok.com/h5/share/usr/6693695300361536513.html?xxx
                //https://www.tiktok.com/@aonokaede?
                //https://t.tiktok.com/i18n/share/user/6541879409543413761/?
                var title = (document.getElementsByTagName('h1').length != 0) ? document.getElementsByTagName('h1')[0].innerText : document.title;
                var userInfo = this.__NEXT_DATA__.props.pageProps.userInfo.user;
                var baseUrl = 'https://www.tiktok.com/@' + userInfo.uniqueId + '/video/';
                var cookie = window.external.getCookie(window.location.href) || document.cookie;
                var vf = cookie.indexOf('s_v_web_id') != -1 ? cookie.match(/s_v_web_id=([^;]+)/)[1] : '';
                var secUid = userInfo.secUid;
                var api_url = 'https://m.tiktok.com/api/post/item_list/?aid=1988&verifyFp=' + vf + '&appId=1233&count=30&secUid=' + secUid + '&cursor=';
                var html = 'title:\"' + title + '\"$'
                var cursor = 0;
                while (true) {
                    var data = window.external.getHtmlCodeEx(api_url + cursor);
                    var jo = JSON.parse(data);
                    //parse...
                    var video = '';
                    for (var idx in jo.itemList) {
                        var item = jo.itemList[idx];
                        //去除thumbnail，全解析
                        video += 'v_title:\"' + item.desc + '\",url:\"' + baseUrl + item.id + '\",duration:' + item.video.duration + ',date:' + item.createTime + ';';
                    }
                    html += video;

                    if (!jo.hasMore)
                        break;

                    cursor = jo.cursor;
                    window.external.doEvents();
                }

                //避免下句赋值过慢，快速返回...原因大抵在于其须得全局墙
                if (typeof(window.external.receive) != 'undefined')
                    window.external.receive(html);
                else {
                    document.head.innerHTML = '';
                    document.body.innerHTML =  html;
                }
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="kuaishou" crpj="true">
        <url><![CDATA[live\.kuaishou\.com/profile/(?<id>[^/\?]+)]]></url>
        <title><![CDATA["name":"([^"]+)]]></title>
        <content><![CDATA[(?is)[\[,]\{"id":"(?<url>[^"]+)","thumbnailUrl":"(?<thumbnail>[^"]+).*?"caption":"(?<title>[^"]*).*?"timestamp":(?<date>[^,]+)]]></content>
        <baseUrl><![CDATA[base_url=([^$]+)]]></baseUrl>
        <ckSign><![CDATA[userId]]></ckSign>
        <jsCode><![CDATA[
            try {
                //https://live.kuaishou.com/profile/hlbe000000
                var m = window.external.url.match(/profile\/([^/\?]+)/);
                var ksId = m[1];
                var variables = '{\"principalId\":\"' + ksId + '\"}';
                var query = 'query privateFeedsQuery($principalId: String, $pcursor: String, $count: Int) {\
                    privateFeeds(principalId: $principalId, pcursor: $pcursor, count: $count) {\
                        pcursor\
                        list {\
                            id\
                            thumbnailUrl\
                            caption\
                            timestamp\
                            user {\
                                name\
                            }\
                        }\
                    }\
                }';

                var html = '';
                var pcursor = '';
                var args = '{\"operationName\":\"privateFeedsQuery\",\"variables\":' + variables + ',\"query\":\"' + query + '\"}';
                //有的机子上直接GetPostResult不行，特置GetPostResultEx
                var cookie = window.external.getCookie(window.location.href) || document.cookie;
                var headers = 'content-type: application/json\r\nCookie: ' + cookie + '\r\nReferer: ' + window.external.url;
                do {
                    var data = window.external.getPostResultEx('https://live.kuaishou.com/m_graphql', args, headers, 500);
                    m = data.match(/pcursor\":\"([^\"]+)/);
                    pcursor = m ? m[1] : undefined;
                    variables = '{\"principalId\":\"' + ksId + '\",\"pcursor\": \"' + pcursor + '\"}';
                    args = '{\"operationName\":\"privateFeedsQuery\",\"variables\":' + variables + ',\"query\":\"' + query + '\"}';
                    html += data;
                }
                while (pcursor && pcursor != 'no_more')

                document.body.innerHTML = '$base_url=https://live.kuaishou.com/u/' + ksId + '/$' + html;
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="kuaishou" crpj="true">
        <url><![CDATA[video\.kuaishou\.com/profile/(?<id>[^/\?]+)]]></url>
        <title><![CDATA["name":"([^"]+)]]></title>
        <content><![CDATA[(?is)photo.*?duration":(?<duration>[^,]+)\d{3},"caption":"(?<title>[^"]*)","timestamp":(?<date>[^,]+),"coverUrl":"(?<thumbnail>[^"]+)","photoUrl":"(?<url>[^"]+)"]]></content>
        <ckSign><![CDATA[userId]]></ckSign>
        <jsCode><![CDATA[
            try {
                //https://video.kuaishou.com/profile/3xe39s6pzcxhs59
                var m = window.external.url.match(/profile\/([^/\?]+)/);
                var ksId = m[1];
                var variables = '{\"userId\":\"' + ksId+ '\"}';
                var query = 'query visionProfilePhotoList($pcursor: String, $userId: String, $page: String) {\
                    visionProfilePhotoList(pcursor: $pcursor, userId: $userId, page: $page) {\
                        pcursor\
                        result llsid feeds {\
                            author {\
                                name\
                            }\
                            photo {\
                                id duration caption timestamp coverUrl photoUrl\
                            }\
                        }\
                    }\
                }';

                var html = '';
                var pcursor = '';
                var args ='{\"operationName\":\"visionProfilePhotoList\",\"variables\":' + variables + ',\"query\":\"' + query + '\"}';
                //有的机子上直接GetPostResult不行，特置GetPostResultEx
                var cookie = window.external.getCookie(window.location.href) || document.cookie;
                var headers = 'content-type: application/json\r\nCookie: ' + cookie + '\r\nReferer: ' + window.external.url;
                do {
                    var data = window.external.getPostResultEx('https://video.kuaishou.com/graphql', args, headers, 500);
                    m = data.match(/pcursor\":\"([^\"]+)/);
                    pcursor = m ? m[1] : null;
                    variables = '{\"userId\":\"' + ksId + '\",\"pcursor\": \"' + pcursor + '\"}';
                    args = '{\"operationName\":\"visionProfilePhotoList\",\"variables\":' + variables + ',\"query\":\"' + query + '\"}';
                    html += data;
                }
                while (pcursor && pcursor != 'no_more')
                if (typeof(window.external.receive) != 'undefined')
                    window.external.receive(html);
                else
                    document.body.innerHTML = html;
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="kuaishou" crpj="true">
        <url><![CDATA[video\.kuaishou\.com/search.*?searchKey=(?<id>[^&]+)]]></url>
        <title><![CDATA[title:"([^"]+)]]></title>
        <content><![CDATA[(?is)photo.*?duration":(?<duration>[^,]+)\d{3},"caption":"(?<title>[^"]*)","timestamp":(?<date>[^,]+),"coverUrl":"(?<thumbnail>[^"]+)","photoUrl":"(?<url>[^"]+)"]]></content>
        <ckSign><![CDATA[userId]]></ckSign>
        <jsCode><![CDATA[
            try {
                //https://video.kuaishou.com/search?searchKey=和平精英
                //https://video.kuaishou.com/search/video?searchKey=%E7%8C%AB
                var sk = decodeURI(window.external.url.match(/searchKey=([^/]+)/)[1]);
                var variables = '{\"keyword\":\"' + sk + '\",\"pcursor\":\"0\",\"page\":\"searchPhoto\"}';
                var query = 'query visionSearchPhoto($keyword: String, $pcursor: String, $searchSessionId: String, $page: String) {\
                    visionSearchPhoto(keyword: $keyword, pcursor: $pcursor, searchSessionId: $searchSessionId, page: $page) {\
                        pcursor\
                        result llsid feeds {\
                            author {\
                                name\
                            }\
                            photo {\
                                id duration caption timestamp coverUrl photoUrl\
                            }\
                        }\
                    }\
                }';

                var html = '';
                var pcursor = '0';
                var args ='{\"operationName\":\"visionSearchPhoto\",\"variables\":' + variables + ',\"query\":\"' + query + '\"}';
                var cookie = window.external.getCookie(window.location.href) || document.cookie;
                var headers = 'content-type: application/json\r\nCookie: ' + cookie + '\r\nReferer: ' + window.external.url;
                do {
                    var data = window.external.getPostResultEx('https://video.kuaishou.com/graphql', args, headers, 500);
                    //try 3 times
                    for (var i = 0; i <= 2; i++) {
                        if (data.indexOf('feeds') != -1)
                            break;
                        data = window.external.getPostResultEx('https://video.kuaishou.com/graphql', args, headers, 500);
                    }
                    pcursor = data.match(/pcursor\":\"([^\"]+)/) ? data.match(/pcursor\":\"([^\"]+)/)[1] : undefined;
                    variables = '{\"keyword\":\"' + sk + '\",\"pcursor\":\"' + pcursor + '\",\"page\":\"searchPhoto\"}';
                    args = '{\"operationName\":\"visionSearchPhoto\",\"variables\":' + variables + ',\"query\":\"' + query + '\"}';
                    html += data;
                }
                while (pcursor && pcursor != 'no_more')

                html = 'title:\"' + sk + '\"$' + html;
                if (typeof(window.external.receive) != 'undefined')
                    window.external.receive(html);
                else
                    document.body.innerHTML = html;
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="chenzhongtech" crpj="true">
        <url><![CDATA[chenzhongtech.com/.*?tagName=(?<id>[^&]+)]]></url>
        <title><![CDATA[title:"([^"]+)]]></title>
        <content><![CDATA[(?is)v_title:"(?<title>[^"]+)",thumbnail:(?<thumbnail>[^,]+),duration:(?<duration>[^,]+),video_url:(?<url>[^,]+),date:(?<date>[^;]+)]]></content>
        <jsCode><![CDATA[
            try {
                //https://ktagshanghai.m.chenzhongtech.com/fw/tag/text?tagName=热门搞笑段子
                var tagName = decodeURIComponent(window.external.url.match(/tagName=([^&]+)/)[1]);
                var html = 'title:\"' + tagName + '\"$';
                var p = '';
                while (true) {
                    if (p > 99)
                        break;
                    var args = '{\"tag\":\"' + tagName + '\",\"count\":20,\"pcursor\":\"' + p + '\"}';
                    var data = window.external.getPostResult('https://ktagshanghai.m.chenzhongtech.com/rest/kd/tag/feed/text', args);
                    data = data.replace(/\r/g, ' ').replace(/\n/g, ' ').replace(/\"\\\{/g, '{').replace(/\\\}\"/g, '}');
                    var jo = JSON.parse(data);
                    if (jo.pcursor == 'no_more')
                        break;

                    var feeds = jo.feeds;
                    for (let i = 0; i <= feeds.length - 1; i++) {
                        var feed = feeds[i];
                        if (feed.mainMvUrls.length == 0)
                            continue;
                        var video_url = feed.mainMvUrls[0].url;
                        html += 'v_title:\"' + feed.caption + '\",thumbnail:' + feed.coverUrls[0].url + ',duration:0,video_url:' + video_url + ',date:' + feed.timestamp + ';\r\n';
                    }
                    p = jo.pcursor;
                    window.external.doEvents();
                }

                if (typeof(window.external.receive) != 'undefined')
                    window.external.receive(html);
                else
                    document.body.innerHTML = html;
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="toutiao" crpj="true">
        <url><![CDATA[toutiao\.com/\w/user/(?<id>[^/]+)]]></url>
        <title><![CDATA[title:"([^"]+)]]></title>
        <content><![CDATA[(?is)image_url":"(?<thumbnail>[^"]+).*?title":"(?<title>[^"]+).*?video_duration_str":"(?<duration>[^"]+).*?item_id":"(?<url>[^"]+)]]></content>
        <baseUrl><![CDATA[https://www.ixigua.com/i]]></baseUrl>
        <jsCode><![CDATA[
            try {
                var title = window.userInfo.name;
                var uid = window.userInfo.id;
                var mt = 0;
                var i = getHoney();
                var html = 'title:\"' + title + '\"$';
                while (true) {
                    var api_url = 'https://www.toutiao.com/toutiao/c/user/article/?page_type=0&user_id=' + uid + '&max_behot_time=' + mt + '&count=20&as=' + i.as + '&cp=' + i.cp;
                    var o = {
                        url: api_url
                    }
                    var st = window.byted_acrawler.sign(o);
                    api_url = api_url.replace('/toutiao', '');
                    var data = window.external.getHtmlCode(api_url + '&_signature=' + st, window.location.href);
                    var jo = JSON.parse(data);
                    html += JSON.stringify(jo.data);
                    if (!jo.has_more)
                        break;

                    mt = jo.next.max_behot_time;
                    window.external.doEvents();
                }
                if (typeof(window.external.receive) != 'undefined')
                    window.external.receive(html);
                else
                    document.body.innerHTML = html;

                function getHoney() {
                    var e = Math.floor(Date.now() / 1e3)
                        , i = e.toString(16).toUpperCase()
                        , t = md5(e).toString().toUpperCase();
                    if (8 != i.length)
                        return {
                            as: '479BB4B7254C150',
                            cp: '7E0AC8874BB0985'
                        };
                    for (var o = t.slice(0, 5), n = t.slice(-5), a = '', s = 0; 5 > s; s++)
                        a += o[s] + i[s];
                    for (var r = '', c = 0; 5 > c; c++)
                        r += i[c + 3] + n[c];
                    return {
                        as: 'A1' + a + i.slice(-3),
                        cp: i.slice(0, 3) + r + 'E1'
                    }
                }

                function md5(s) {
                    return window.external.md5(s);
                }
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="nfmovies" watchList="true">
        <url><![CDATA[nfmovies\.com/video/(?<id>\d+)-\d+-[1-9]+\d*\.html?]]></url>
        <title><![CDATA[title:"([^"]+)]]></title>
        <content><![CDATA[(?is)<li.*?a\s+title="(?<title>[^"]+).*?href="(?<url>[^"]+)]]></content>
        <baseUrl><![CDATA[https://www.nfmovies.com]]></baseUrl>
        <jsCode><![CDATA[
            try {
                //https://www.nfmovies.com/video/6018-2-101.html
                var title = document.getElementsByTagName('h3').length != 0 ? document.getElementsByTagName('h3')[0].innerText : document.title;
                var branch = parseInt(window.location.href.match(/\d+-(\d+)-\d+/)[1]) + 1;
                document.body.innerHTML = 'title:\"' + title + '\"$' + document.getElementById('player' + branch).innerHTML;
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="babybus">
        <url><![CDATA[babybus\.com/video/(?<id>[^.]+)\.html?]]></url>
        <title><![CDATA[<li\s+class="active">([^<]+)</li>]]></title>
        <content><![CDATA[(?is)<div\s+class="col-lg-2.*?href="(?<url>[^"]+).*?data-original="(?<thumbnail>[^"]+).*?<p>(?<title>[^<]+)</p>]]></content>
    </item>
    <item domain="baobao88" crpj="true">
        <url><![CDATA[baobao88\.com/lianbo/(?<id>[^.]+)\.html?]]></url>
        <title><![CDATA[<h1>([^<]+)</h1>]]></title>
        <content><![CDATA[(?is)<span\s+class="songname.*?href="(?<url>[^"]+).*?>(?<title>[^<]+)]]></content>
    </item>
    <item domain="baobao88" crpj="true">
        <url><![CDATA[baobao88\.com/(?:bbstory|bbmusic|youshen|)/[^/]+/(?:(?<id>\d+_\d+)\.html?)?]]></url>
        <title><![CDATA[<h1>([^<]+)</h1>]]></title>
        <content><![CDATA[(?is)<ul><li>.*?href="(?<url>[^"]+).*?>(?<title>[^<]+)</a>]]></content>
        <baseUrl><![CDATA[http://www.baobao88.com]]></baseUrl>
    </item>
    <item domain="tingchina" crpj="true">
        <url><![CDATA[tingchina\.com/.*?/disp_(?<id>[^.]+)\.html?]]></url>
        <title><![CDATA[title:"([^"]+)]]></title>
        <content><![CDATA[(?is)<a.*?href="(?<url>[^"]+)">(?<title>[^<]+).*?</a>]]></content>
        <baseUrl><![CDATA[(http.*?)disp_]]></baseUrl>
        <jsCode><![CDATA[
            try {
                //https://www.tingchina.com/yousheng/disp_30884.htm
                var title = window.bookname || document.title;
                document.body.innerHTML = 'title:\"' + title + '\"$' + document.getElementsByClassName('list')[0].innerHTML;
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="ting55" crpj="true">
        <url><![CDATA[ting55\.com/book/\d+$]]></url>
        <title><![CDATA[title:"([^"]+)]]></title>
        <content><![CDATA[<li>.*?href="(?<url>[^"]+)">(?<title>[^<]+)</a>]]></content>
        <baseUrl><![CDATA[https://ting55.com]]></baseUrl>
        <jsCode><![CDATA[
            try {
                //https://ting55.com/book/13747
                var title = (document.getElementsByTagName('h1').length != 0) ? document.getElementsByTagName('h1')[0].innerText : document.title;
                document.body.innerHTML = 'title:\"' + title + '\"$' + document.getElementsByClassName('plist')[0].innerHTML;
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="ting89" crpj="true">
        <url><![CDATA[ting89\.com/books/(?<id>[^\.]+)\.html?]]></url>
        <title><![CDATA[title:"([^"]+)]]></title>
        <content><![CDATA[<li>.*?href="(?<url>[^"]+)[^>]*>(?<title>[^<]+)</a>]]></content>
        <baseUrl><![CDATA[http://www.ting89.com]]></baseUrl>
        <jsCode><![CDATA[
            try {
                //http://www.ting89.com/books/15921.html
                var title = (document.getElementsByTagName('h1').length != 0) ? document.getElementsByTagName('h1')[0].innerHTML.substr(0, document.getElementsByTagName('h1')[0].innerHTML.indexOf('<')) : document.title;
                document.body.innerHTML = 'title:\"' + title + '\"$' + document.getElementsByClassName('compress')[0].innerHTML;
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="qingting" crpj="true">
        <url><![CDATA[qingting\.fm/channels/(?<id>\d+)/?$]]></url>
        <title><![CDATA[title:"([^"]+)]]></title>
        <content><![CDATA[(?is)v_title:"(?<title>[^"]+)",duration:(?<duration>[^,]+),video_url:(?<url>[^,]+),date:(?<date>[^;]+)]]></content>
        <baseUrl><![CDATA[https://www.qingting.fm]]></baseUrl>
        <ckSign><![CDATA[qingting_id]]></ckSign>
        <jsCode><![CDATA[
            try {
                //https://www.qingting.fm/channels/75352/
                var cid = window.location.href.match(/channels\/([^\/]+)/)[1];
                var title = (document.getElementsByTagName('h1').length != 0) ? document.getElementsByTagName('h1')[0].innerText : document.title;
                var html = 'title:\"' + title + '\"$';
                var p = 1;
                while (true) {
                    var args = '{\"query\":\"{channelPage(cid:' + cid + ',page:' + p + '){\
                        plist\
                    }}\"}';
                    var data = window.external.getPostResult('https://webbff.qingting.fm/www', args);
                    var jo = JSON.parse(data);
                    if (jo.errors)
                        break;

                    var plist =  jo.data.channelPage.plist;
                    for (let i = 0; i <= plist.length - 1; i++) {
                        var item = plist[i];
                        var video_url = 'https://www.qingting.fm/channels/' + cid + '/programs/' + item.id;
                        html += 'v_title:\"' + item.title + '\",duration:' + item.duration + ',video_url:' + video_url + ',date:' + item.update_time + ';\r\n';
                    }
                    p++;
                    window.external.doEvents();
                }

                if (typeof(window.external.receive) != 'undefined')
                    window.external.receive(html);
                else
                    document.body.innerHTML = html;
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="qingting" crpj="true">
        <url><![CDATA[qingting\.fm/podcasters/(?<id>[^/]+)/]]></url>
        <title><![CDATA[<h1[^>]+>([^<]+)</h1>]]></title>
        <content><![CDATA[(?is)<li\s+class="program-row-root.*?href="(?<url>[^"]+).*?title="(?<title>[^"]+).*?col2">(?<duration>[^<]+).*?col4">(?<date>[^<]*)]]></content>
        <baseUrl><![CDATA[https://www.qingting.fm]]></baseUrl>
        <ckSign><![CDATA[qingting_id]]></ckSign>
        <jsCode><![CDATA[
            try {
                //https://www.qingting.fm/podcasters/a819fb7e6be8834dfbfc42fcb03b55cb/
                var completed = false;
                function interval() {
                    if (document.getElementsByClassName('moresView').length != 0) {
                        document.getElementsByClassName('moresView')[0].firstElementChild.click();
                        setTimeout(interval, 1500);
                    }
                    else
                        completed = true;
                }
                setTimeout(interval, 1500)
                while (!completed)
                    window.external.doEvents();
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="missevan">
        <url><![CDATA[missevan\.com/albuminfo/(?<id>[^/]+)]]></url>
        <title><![CDATA[channel_zone_name">([^<]+)</div>]]></title>
        <content><![CDATA[(?is)<div\s+class="magic-box fccard.*?<a[^>]+title="(?<title>[^"]+)"\s+href="(?<url>[^"]+).*?data-cover="(?<thumbnail>[^"]+).*?data-time="(?<duration>[^"]+)]]></content>
        <baseUrl><![CDATA[https://www.missevan.com]]></baseUrl>
    </item>
    <item domain="missevan" crpj="true">
        <url><![CDATA[missevan\.com/(?<id>[^.]+)/#/sound]]></url>
        <title><![CDATA[username:\s+"([^"]+)"]]></title>
        <content><![CDATA[(?is)<div\s+title="(?<title>[^"]+)"\s+class.*?href="(?<url>[^"]+).*?-time">(?<duration>[^<]+)]]></content>
        <baseUrl><![CDATA[https://www.missevan.com]]></baseUrl>
    </item>
    <item domain="icourses" referer="true">
        <url><![CDATA[icourses\.cn/web/sword/portal/videoDetail.*?courseId=(?<id>[^#]+)$]]></url>
        <title><![CDATA[_courseTitle='([^']+)']]></title>
        <content><![CDATA[(?is)duration":"(?<duration>[^"]+).*?fullLinkUrl":"(?<url>[^"]+).*?fullPreviewUrl":"(?<thumbnail>[^"]+).*?title":"(?<title>[^"]+)]]></content>
    </item>
    <item domain="icourses" watchList="true" referer="true">
        <url><![CDATA[icourses\.cn/web/sword/portal/videoDetail.*?courseId=(?<id>[^#]+).*?resId=]]></url>
        <title><![CDATA[username:\s+"([^"]+)"]]></title>
        <content><![CDATA[(?is)duration":"(?<duration>[^"]+).*?fullLinkUrl":"(?<url>[^"]+).*?fullPreviewUrl":"(?<thumbnail>[^"]+).*?title":"(?<title>[^"]+)]]></content>
    </item>
    <item domain="rthk" watchList="true" crpj="true">
        <url><![CDATA[(?:rthk\.\w+|59\.188\.18\.220)/podcast/item\.php\?pid=(?<id>\d+)&eid=\d+(?:&year=\d+)?]]></url>
        <title><![CDATA[prog-box-title">\s+<h2[^>]+>([^<]+)</h2>]]></title>
        <content><![CDATA[(?is)<episode>\s+.*?<episodeTitle>.*?A\[(?<title>.*?)\].*?<cover>.*?A\[(?<thumbnail>.*?)\].*?<duration>(?<duration>[^<]+)</duration>.*?<mediafile>.*?A\[(?<url>.*?)\].*?</episode>]]></content>
        <jsCode><![CDATA[
            try {
                var href = window.location.href;
                var pid = href.match(/pid=(\d+)/)[1];
                var m = href.match(/year=(\d+)/);
                var year = m ? m[1] : new Date().getFullYear();
                var p = 1;
                var html = '';
                while (true) {
                    var url = 'https://podcasts.rthk.hk/podcast/episodeList.php?pid=' + pid + '&year=' + year + '&page=' + p;
                    var data = window.external.getHtmlCode(url);
                    if (data.indexOf('<episode>') == -1)
                        break;

                    html += data;
                    p++;
                    window.external.doEvents();
                }
                document.body.innerHTML += html;
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="rthk" crpj="true">
        <url><![CDATA[(?:rthk\.\w+|59\.188\.18\.220)/podcast/item\.php\?pid=(?<id>\d+)(?:&[^e])]]></url>
        <title><![CDATA[prog-box-title">\s+<h2[^>]+>([^<]+)</h2>]]></title>
        <content><![CDATA[(?is)<episode>\s+.*?<episodeTitle>.*?A\[(?<title>.*?)\].*?<cover>.*?A\[(?<thumbnail>.*?)\].*?<duration>(?<duration>[^<]+)</duration>.*?<mediafile>.*?A\[(?<url>.*?)\].*?</episode>]]></content>
        <jsCode><![CDATA[
            try {
                var href = window.location.href;
                var pid = href.match(/pid=(\d+)/)[1];
                var m = href.match(/year=(\d+)/);
                var year = m ? m[1] : new Date().getFullYear();
                var p = 1;
                var html = '';
                while (true) {
                    var url = 'https://podcasts.rthk.hk/podcast/episodeList.php?pid=' + pid + '&year=' + year + '&page=' + p;
                    var data = window.external.getHtmlCode(url);
                    if (data.indexOf('<episode>') == -1)
                        break;

                    html += data;
                    p++;
                    window.external.doEvents();
                }
                document.body.innerHTML += html;
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="rthk" watchList="true" crpj="true">
        <url><![CDATA[rthk\.\w+/podcast/topic_playlist\.php\?id=(?<id>\d+)&eid=\d+]]></url>
        <title><![CDATA[<h1>([^<]+)</h1>]]></title>
        <content><![CDATA[(?is)<div\s+class="epi-item.*?href="(?<url>[^"]+).*?data-src="(?<thumbnail>[^"]+).*?item-desc">(?<title>[^<]+)</div>]]></content>
        <baseUrl><![CDATA[https://podcasts.rthk.hk/podcast/]]></baseUrl>
    </item>
    <item domain="rthk" crpj="true">
        <url><![CDATA[rthk\.\w+/podcast/topic_playlist\.php\?id=(?<id>\d+)]]></url>
        <title><![CDATA[<h1>([^<]+)</h1>]]></title>
        <content><![CDATA[(?is)<div\s+class="epi-item.*?href="(?<url>[^"]+).*?data-src="(?<thumbnail>[^"]+).*?item-desc">(?<title>[^<]+)</div>]]></content>
        <baseUrl><![CDATA[https://podcasts.rthk.hk/podcast/]]></baseUrl>
    </item>
    <item domain="rthk" crpj="true">
        <url><![CDATA[rthk\.\w+/radio.*/(?<id>[^/]+)]]></url>
        <title><![CDATA[<h1>([^<]+)</h1>]]></title>
        <content><![CDATA[(?is)<div\s+class="latWrap.*?<p>(?<title>[^<]+)</p>.*?<video\s+src="(?<url>[^"]+).*?</div>]]></content>
        <jsCode><![CDATA[
            try {
                var idx = 0;
                if (document.getElementsByClassName('progCon').length != 0) {
                    var pc = document.getElementsByClassName('progCon')[0];
                    if (pc.innerText.trim() != '') {
                        document.getElementsByClassName('latBlock')[0].innerHTML = pc.innerHTML;
                        pc.innerHTML = '';
                        idx = 5;
                    }
                }

                var date = (idx == 0) ? document.body.innerHTML.match(/date=([^&]+).*?radio/)[1] : document.body.innerHTML.match(/date=([^&]+).*?radioEpi/)[1];
                document.getElementsByTagName('h1')[0].innerText += ' ' + date;
                var matchs = document.body.innerHTML.match(/https:\/\/.*?\.m3u8[^\"]*/g);
                var cmts = document.getElementsByClassName('latWrap radio');
                for (let i = 0; i <= cmts.length - 1; i++) {
                    cmts[i].innerHTML += '<video src=\"' + matchs[i + idx] + '\" />';
                }
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="xiaohongshu">
        <url><![CDATA[xiaohongshu\.com/user/profile/(?<id>[^/]+)]]></url>
        <title><![CDATA["nickname":"([^"]+)"]]></title>
        <content><![CDATA[(?is)[[,]\{"id":"(?<url>[^"]+).*?"title":"(?<title>[^"]+)".*?"url":"(?<thumbnail>[^"]+).*?\}]]></content>
        <baseUrl><![CDATA[https://www.xiaohongshu.com/discovery/item/]]></baseUrl>
        <jsCode><![CDATA[
            try {
                document.body.innerHTML = JSON.stringify(window.__INITIAL_SSR_STATE__);
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="uc" crpj="true">
        <url><![CDATA[mp\.uc\.cn/.*?mid=(?<id>[^&]+)]]></url>
        <title><![CDATA[title:"([^"]+)]]></title>
        <content><![CDATA[(?is)\{.*?content_id":"(?<url>[^"]+).*?title":"(?<title>[^"]+).*?cover_url":"(?<thumbnail>[^"]+).*?duration":(?<duration>[^,]+)]]></content>
        <baseUrl><![CDATA[http://v.mp.uc.cn/video.html?from=media#!wm_cid=]]></baseUrl>
        <jsCode><![CDATA[
            try {
                var href = window.location.href;
                var mid = href.match(/mid=([^&]+)/)[1];
                var biz_id= globalConfig.biz_id;
                var api_url = 'https://ff.dayu.com/author/' + biz_id + '/' + mid;
                var data = window.external.getHtmlCode(api_url);
                var jo = JSON.parse(data);
                var title = jo.data.author_name;

                //content
                var ps = href.match(/uc_param_str=([^&]+)/)[1];
                var base_url = 'https://ff.dayu.com/contents/author/' + mid + '?biz_id=' + biz_id + '&_size=8&_order_type=published_at&status=1&_fetch=1&uc_param_str=' + ps + '&_page=';
                var html = 'title:\"' + title + '\"$';
                var p = 1;
                while (true) {
                    api_url = base_url + p + '&_=' + Date.now();
                    data = window.external.getHtmlCode(api_url, href, true, 200);
                    if (data.indexOf('\"data\":[{') == -1)
                        break;

                    html += '$' + data;
                    p++;
                    window.external.doEvents();
                }

                if (typeof(window.external.receive) != 'undefined')
                    window.external.receive(html);
                else
                    document.body.innerHTML = html;
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="lizhi" crpj="true">
        <url><![CDATA[lizhi\.fm/user/(?<id>\d+)]]></url>
        <title><![CDATA[title:"([^"]+)]]></title>
        <content><![CDATA[(?is)<li.*?<a\s+title="(?<title>[^"]+).*?href="(?<url>[^"]+).*?data-cover="(?<thumbnail>[^"]+).*?data-duration="(?<duration>[^"]+).*?</li>]]></content>
        <baseUrl><![CDATA[https://www.lizhi.fm]]></baseUrl>
        <jsCode><![CDATA[
            try {
                var title = this.document.getElementsByTagName('h1')[0].innerText;
                var base_url = window.external.url;
                if (base_url.indexOf('/p/') != -1)
                    base_url = url.substr(0, url.indexOf('/p/'));
                var html = 'title:\"' + title + '\"$';
                var p = 1;
                while (true) {
                    var url = base_url + '/p/' + p + '.html';
                    var data = window.external.getHtmlCode(url);
                    if (data.indexOf('audioList fontYaHei js-audio-list') == -1)
                        break;

                    data = data.substring(data.indexOf('audioList fontYaHei js-audio-list') - 11, data.lastIndexOf('</ul>') + 6).trim();
                    html += '$' + data;
                    p++;
                    window.external.doEvents();
                }

                if (typeof(window.external.receive) != 'undefined')
                    window.external.receive(html);
                else
                    document.body.innerHTML = html;
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="xiangha" crpj="true">
        <url><![CDATA[xiangha\.com/share/userHome\?code=(?<id>\d+)]]></url>
        <title><![CDATA[title:"([^"]+)]]></title>
        <content><![CDATA[(?is)v_title:"(?<title>[^"]+)",thumbnail:"(?<thumbnail>[^"]+)",video_url:"(?<url>[^"]+)"]]></content>
        <jsCode><![CDATA[
            try {
                //https://m.xiangha.com/share/userHome?code=729943244210
                var title = document.getElementsByClassName('name').length != 0 ? document.getElementsByClassName('name')[0].innerText : document.title;
                var code = window.location.href.match(/code=([^&]+)/)[1];
                var api_url = 'https://m.xiangha.com/share/getNote?code=' + code + '&page=';
                var html = 'title:\"' + title + '\"$';
                var p = 1;
                while (true) {
                    var data = window.external.getHtmlCode(api_url + p);
                    if (data.indexOf('list\":[{') == -1)
                        break;

                    var jo = JSON.parse(data);
                    //parse...
                    var video = '';
                    for (var v in jo.data.list) {
                        var video = jo.data.list[v];
                        html += 'v_title:\"' + video.title + '\",thumbnail:\"' + video.image.url + '\",video_url:\"' + video.url + '\";';
                    }
                    p++;
                    window.external.doEvents();
                }

                if (typeof(window.external.receive) != 'undefined')
                    window.external.receive(html);
                else
                    document.body.innerHTML = html;
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="wotvb">
        <url><![CDATA[wotvb\.com/detail/(?<id>\w+)\.html?]]></url>
        <title><![CDATA[<h1[^>]+>([^<]+)</h1>]]></title>
        <content><![CDATA[(?is)<li><a\s+href="(?<url>/play[^"]+)">(?<title>[^<]+)</a></li>]]></content>
        <baseUrl><![CDATA[https://www.wotvb.com]]></baseUrl>
    </item>
    <item domain="haojuwu">
        <url><![CDATA[haojuwu\.net/[^m]\w+/(?<id>[^/]+)]]></url>
        <title><![CDATA[<h3>([^<]+)</h3>]]></title>
        <content><![CDATA[(?is)<li><a\s+href="(?<url>/play[^"]+)">(?<title>[^<]+)</a></li>]]></content>
        <baseUrl><![CDATA[http://www.haojuwu.net]]></baseUrl>
    </item>
    <item domain="5tps" crpj="true" delay="1500">
        <url><![CDATA[5tps\.com/html/(?<id>[^.]+)\.html?]]></url>
        <title><![CDATA[title:"([^"]+)]]></title>
        <content><![CDATA[(?is)<a\s+href="(?<url>[^"]+)">(?<title>[^<]+)</a>]]></content>
        <baseUrl><![CDATA[https://www.5tps.com]]></baseUrl>
        <jsCode><![CDATA[
            try {
                //https://www.5tps.com/html/168.html
                var title = document.getElementsByTagName('h1')[0].innerText;
                var html = document.getElementsByClassName('bfdz')[0].innerHTML;
                document.body.innerHTML = 'title:\"' + title + '\"$' + html;
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="cmdy5">
        <url><![CDATA[cmdy5\.com/[^p]\w+/(?<id>\w+)\.html?]]></url>
        <title><![CDATA[<a href='[^']+'>([^<]+)</a></h1>]]></title>
        <content><![CDATA[(?is)<li><a\s+title='(?<title>[^']+)'\s+href='(?<url>[^']+).*?</li>]]></content>
    </item>
    <item domain="22tu">
        <url><![CDATA[22tu\.cc/html/(?<id>[^/]+)]]></url>
        <title><![CDATA[title:"([^"]+)]]></title>
        <content><![CDATA[(?is)<a\s+title="(?<title>[^"]+)"\s+href="(?<url>[^"]+)"]]></content>
        <baseUrl><![CDATA[http://www.22tu.cc]]></baseUrl>
        <jsCode><![CDATA[
            try {
                var title = document.getElementsByTagName('h1')[0].innerText;
                var html = document.getElementsByClassName('play-list')[0].innerHTML;
                document.body.innerHTML = 'title:\"' + title + '\"$' + html;
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="y3600">
        <url><![CDATA[y3600\.cc/[^/]+/.*?(?<id>\d+)\.html?]]></url>
        <title><![CDATA[title:"([^"]+)]]></title>
        <content><![CDATA[(?is)<li\s+title="(?<title>[^"]+).*?url="(?<url>[^"]+)"]]></content>
        <jsCode><![CDATA[
            try {
                var title = document.getElementsByTagName('h1')[0].innerText;
                var html = document.body.innerHTML;
                var pl = document.getElementById('playlist');
                var ul = pl.children[1].children[0];
                if (ul) {
                    for (let i = 0; i <= ul.childElementCount - 1; i++) {
                        var li = ul.childNodes[i];
                        var url = li.innerHTML.match(/htt[^']+/)[0];
                        url = decodeURIComponent(url.replace(/\^/g, '%'));
                        li.setAttribute('url', url);
                        li.setAttribute('title', li.innerText);
                    }
                    html = ul.innerHTML;
                }

                html = 'title:\"' + title + '\"$' + html;
                if (typeof(window.external.receive) != 'undefined')
                    window.external.receive(html);
                else
                    document.body.innerHTML = html;
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="linecg" watchList="true">
        <url><![CDATA[linecg\.com/video/(?<id>play_\d+_\d+)\.html?]]></url>
        <title><![CDATA[video_title='([^']+)']]></title>
        <content><![CDATA[(?is)<a\s+href="\.\./(?<url>[^"]+)">\s+<div.*?<img[^>]+src="(?<thumbnail>[^"]+).*?<p\s+class="fl">(?<title>[^<]+)</p>]]></content>
        <baseUrl><![CDATA[https://www.linecg.com/]]></baseUrl>
    </item>
    <item domain="qhtb">
        <url><![CDATA[qhtb\.cn/yshj]]></url>
        <title><![CDATA['content_title'\s+:\s+'([^']+)']]></title>
        <content><![CDATA[(?is)<li\s+class="jujilist"[^>]+data-video-id="(?<url>[^"]+)"\s+>\s+(?<title>\d+)\s+</li>]]></content>
        <baseUrl><![CDATA[http://v.qhtb.cn/m2o/player/video.php?id=]]></baseUrl>
    </item>
    <item domain="kangbatv">
        <url><![CDATA[kangbatv\.com/ysj/dsj/[^/]+/?$]]></url>
        <title><![CDATA[<span>([^<]+)</span>\s+</ul>]]></title>
        <content><![CDATA[(?is)<li\s?>\s+<a\s+href="(?<url>[^"]+)"\s+title="(?<title>[^"]+)"]]></content>
    </item>
    <item domain="kangbatv" watchList="true" crpj="true">
        <url><![CDATA[kangbatv\.com/ysj/dsj/.*?/(?<id>\d+)\.html?]]></url>
        <title><![CDATA[<span>([^<]+)</span>\s+</ul>]]></title>
        <content><![CDATA[(?is)<li>\s+<a title="(?<title>[^"]+)"[^<]+href="(?<url>[^"]+)".*?</li>]]></content>
    </item>
    <item domain="thailianwang">
        <url><![CDATA[thailianwang\.com/dianshiju/m(?<id>[^/]+)]]></url>
        <title><![CDATA[title:"([^"]+)]]></title>
        <content><![CDATA[(?is)<li><a[^>]+href=.*?vid=(?<url>[^"]+).*?(?<title>第\d+集)</a></li>]]></content>
        <jsCode><![CDATA[
            try {
                var title = document.getElementById('thread_subject').innerText;
                var html = document.getElementsByClassName('content')[0].innerHTML;
                document.body.innerHTML = 'title:\"' + title + '\"$' + html;
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="pornhub" crpj="true">
        <url><![CDATA[pornhub\.com/pornstar/(?<id>[^/?]+)]]></url>
        <title><![CDATA[title:"([^"]+)]]></title>
        <content><![CDATA[(?is)<li\s+class="pcVideoListItem.*?<img[^>]+src="(?<thumbnail>[^"]+).*?duration">(?<duration>[^<]+).*?\s+title="(?<title>[^"]+).*?href="/(?<url>[^"]+)]]></content>
        <baseUrl><![CDATA[https://www.pornhub.com/]]></baseUrl>
        <jsCode><![CDATA[
            try {
                //https://cn.pornhub.com/pornstar/angel-piaff
                //https://cn.pornhub.com/pornstar/amanda-lane
                var title = (document.getElementsByTagName('h1').length != 0) ? document.getElementsByTagName('h1')[0].innerText : document.title;
                var html = 'title:\"' + title + '\"$';
                var href = window.location.href;
                if (href.indexOf('?') == -1) {
                    var p = 1;
                    while (true) {
                        var url = href + '?page=' + p;
                        var data = window.external.getHtmlCode(url);
                        if (!data)
                            break;

                        data = data.substring(data.indexOf('<ul class=\"videos'), data.indexOf('nf-wrapper')).trim();
                        html += '$' + data;
                        p++;
                        window.external.doEvents();
                    }
                }
                else {
                    var data = window.external.getHtmlCode(href);
                    html += data.substring(data.indexOf('<ul class=\"videos'), data.indexOf('nf-wrapper')).trim();
                }

                document.head.innerHTML = '';
                if (typeof(window.external.receive) != 'undefined')
                    window.external.receive(html);
                else
                    document.body.innerHTML = html;
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="pornhub" crpj="true">
        <url><![CDATA[pornhub\.com/playlist/(?<id>[^/?]+)]]></url>
        <title><![CDATA[title:"([^"]+)]]></title>
        <content><![CDATA[(?is)<li\s+class="pcVideoListItem.*?<img[^>]+src="(?<thumbnail>[^"]+).*?duration">(?<duration>[^<]+).*?\s+title="(?<title>[^"]+).*?href="/(?<url>[^"]+)]]></content>
        <baseUrl><![CDATA[https://www.pornhub.com/]]></baseUrl>
        <jsCode><![CDATA[
            try {
                //https://cn.pornhub.com/playlist/163073692
                //https://www.pornhub.com/playlist/96273971
                var html = 'title:\"' + PLAYLIST_VIEW.title + '\"$';
                var api_url = window.location.protocol + '//' + window.location.host + lazyloadUrl;
                var p = 1;
                while (true) {
                    var data = window.external.getHtmlCode(api_url + '&page=' + p, window.location.href);
                    if (!data)
                        break;

                    html += '$' + data;
                    p++;
                    window.external.doEvents();
                }
                if (typeof(window.external.receive) != 'undefined')
                    window.external.receive(html);
                else
                    document.body.innerHTML = html;
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="pornhub" crpj="true" delay="4500">
        <url><![CDATA[pornhub\.com/.*?search=(?<id>[^&]+)]]></url>
        <title><![CDATA[title:"([^"]+)]]></title>
        <content><![CDATA[(?is)<li\s+class="pcVideoListItem.*?href="(?<url>[^"]+).*?title="(?<title>[^"]+).*?src="(?<thumbnail>http[^"]+).*?duration">(?<duration>[^<]+)]]></content>
        <baseUrl><![CDATA[https://www.pornhub.com]]></baseUrl>
        <jsCode><![CDATA[
            try {
                var title = document.getElementById('searchInput').value;
                document.head.innerHTML = '';
                document.body.innerHTML = 'title:\"' + title + '\"$' + document.getElementById('videoSearchResult').innerHTML;
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <item domain="xvideos" crpj="true">
        <url><![CDATA[xvideos\.com/[^/]+/(?<id>[^#]+)#_tabVideos]]></url>
        <title><![CDATA[title:"([^"]+)]]></title>
        <content><![CDATA[(?is)<div\s+class="thumb-block.*?href="(?<url>[^"]+).*?<img[^>]+src="(?<thumbnail>[^"]+).*?<a\s+title="(?<title>[^"]+).*?duration">(?<duration>[^<]+)</span>]]></content>
        <baseUrl><![CDATA[https://www.xvideos.com]]></baseUrl>
        <headers><![CDATA[User-Agent: None]]></headers>
        <jsCode><![CDATA[
            try {
                var url = this.window.location.href.substr(0, this.window.location.href.indexOf('#')) + '/videos/best/';
                var html = 'title:\"' + window.xv.conf.data.user.username + '\"$';
                var p = 0;
                while (true) {
                    var data = window.external.getHtmlCodeEx(url + p, 'User-Agent: None');
                    if (!data)
                        break;

                    html += data;
                    p++;
                    window.external.doEvents();
                }

                if (typeof(window.external.receive) != 'undefined')
                    window.external.receive(html);
                else
                    document.body.innerHTML = html;
            }
            catch (ex) {
            }
        ]]></jsCode>
    </item>
    <!--<item domain="xvideos">
        <url><![CDATA[xvideos\.com/[^/]+/(?<id>\d+)]]></url>
        <title><![CDATA[<title>([^>]+)\s+-\s+[^<]+</title>]]></title>
        <content><![CDATA[(?is)<div\s+id="video_.*?href="(?<url>[^"]+).*?<img[^>]+data-src="(?<thumbnail>[^"]+).*?title="(?<title>[^"]+)]]></content>
        <baseUrl><![CDATA[https://www.xvideos.com]]></baseUrl>
        <headers><![CDATA[User-Agent: None]]></headers>
    </item>-->
    <item domain="pervertslut">
        <url><![CDATA[pervertslut\.com/(?<id>[^/]+)/(?:\d+/)?$]]></url>
        <title><![CDATA[<title>([^>]+)\s+/\s+[^<]+</title>]]></title>
        <content><![CDATA[(?is)<div\s+class="item.*?href="(?<url>[^"]+).*?title="(?<title>[^"]+).*?src="(?<thumbnail>[^"]+).*?duration-overlay">(?<duration>[^<]+)</div>]]></content>
    </item>
    <item domain="hanjutv" updateTitle="true">
        <url><![CDATA[hanjutv\.com/hanju/(?<id>[^.]+)\.html?]]></url>
        <title><![CDATA[<h1[^>]+>([^<]+)</h1>]]></title>
        <content><![CDATA[(?is)<li><a\s+target="_blank"\s+href="(?<url>[^"]+)">(?<title>[^<]+)</a></li>]]></content>
        <baseUrl><![CDATA[https://www.hanjutv.com]]></baseUrl>
    </item>
    <item domain="isuntv">
        <url><![CDATA[isuntv\.com/[^/]+/videos/(?<id>[^/]+)]]></url>
        <title><![CDATA[<h1[^>]+>([^<]+)</h1>]]></title>
        <content><![CDATA[(?is)<div\s+class="c_videosArrow_item".*?href="(?<url>[^"]+).*?url\((?<thumbnail>[^)]+).*?<h3[^>]+>(?<title>[^<]+)]]></content>
        <baseUrl><![CDATA[http://www.isuntv.com]]></baseUrl>
    </item>
    <item domain="dancebook">
        <url><![CDATA[dancebook\.com\.cn/home/videolist]]></url>
        <title><![CDATA[<h4>([^<]+)</h4>]]></title>
        <content><![CDATA[(?is)<li>\s+<a[^>]+href="(?<url>[^"]+).*?img[^>]+src="(?<thumbnail>[^"]+).*?video-title.*?>(?<title>[^<]+)]]></content>
        <baseUrl><![CDATA[http://www.dancebook.com.cn]]></baseUrl>
    </item>
    <item domain="javzw">
        <url><![CDATA[javzw\.com/category/[^/]+/(?<id>[^/]+)]]></url>
        <title><![CDATA[<title>([^<]+)\s+-\s+[^>]+</title>]]></title>
        <content><![CDATA[(?is)<div\s+class="thumbnail.*?href="(?<url>[^"]+).*?title="(?<title>[^"]+).*?img[^>]+src="(?<thumbnail>[^"]+).*?</div>]]></content>
    </item>
    <item domain="sciencedirect">
        <url><![CDATA[sciencedirect\.com/[^/]+/[^/]+/.*?/(?<id>\w+)$]]></url>
        <title><![CDATA[<title[^>]+>([^<]+)\s+\|\s+ScienceDirect\.com</title>]]></title>
        <content><![CDATA[(?is)<li.*?js-article-title">(?<title>[^<]+).*?href="/(?<url>[^"]+).*?</li>]]></content>
        <baseUrl><![CDATA[https://www.sciencedirect.com/]]></baseUrl>
    </item>
    <item domain="afreecatv" crpj="true" delay="4500">
        <url><![CDATA[afreecatv\.com/(?<id>[^/]+)/vods]]></url>
        <title><![CDATA[<h2>([^<]+)</h2>]]></title>
        <content><![CDATA[(?is)<li><div class="thum.*?href="(?<url>[^"]+).*?time">(?<duration>[^<]+).*?title"><a[^>]+>(?<title>[^<]+)]]></content>
    </item>
    <item domain="leleketang">
        <url><![CDATA[leleketang\.com/.*?/\w+\d+-([0-9-]+)\.shtml?]]></url>
        <title><![CDATA["cv_name ellipsis"\s+title="([^"]+)"]]></title>
        <content><![CDATA[(?is)<div\s+class="cv_item.*?href="(?<url>[^"]+).*?src="(?<thumbnail>[^"]+).*?title="(?<title>[^"]+)]]></content>
        <baseUrl><![CDATA[(https?.*?/)\w+\d+]]></baseUrl>
    </item>
</patterns>