/*
@header({
  searchable: 2,
  filterable: 1,
  quickSearch: 0,
  title: 'TVB云播',
  '类型': '影视',
  lang: 'ds'
})
*/

var rule = {
    title: 'TVB云播',
    //发布页：http://www.hktvyb.vip/
    host: 'http://www.viptv01.com',
    url: '/vod/show/id/fyfilter.html',
    filterable: 1,//是否启用分类筛选,
    filter_url: '{{fl.cateId}}{{fl.area}}{{fl.by}}{{fl.class}}{{fl.lang}}{{fl.letter}}/page/fypage{{fl.year}}',
    class_name: '电影&电视剧&综艺&动漫&日韩剧&国产剧&欧美剧&港台剧',
    class_url: '1&2&3&4&16&13&15&14',
    filter: 'H4sIAAAAAAAAA+2Z7VIiRxSG74XfVjGDrh97B7mG1P5gN1SyFWOq1KTK2rJKRRDUCFouLgt+ZUXQiIIao0OQm5nuGe4iA92cPn3GWsbSpDYJP33O6+nutxv6ZeZdyAy9/Ppd6PvYXOhl6E10NvbVN6Gh0FT0h5j3t1NvsL017++fo5M/xbrCKQ+zRKUdr3Sw94cZmh+SeLViN4tOekVWRlUlV2TpsqqMQcVJ1Xk8oSrjqlLeZHcNVZmACl/M8oWcqpiGGihd1tqZanY89cG20qgUCc2/6hTl0iejMzNq5aLR51dOlidpuNspLJm+Tl0imb4sXSKZ7jAZSDDdNjKQYLpJpItgullkLoL1JG71mK2f6hLJYC6rF06TSCRDK3K2G74VdRhISiu+FUkG060e2/cHZLqCQZfkVjt/QroIBl32Tr01ki6CgWTpzMltEolgIImv8qWPRCIY+NLIsMQt8UWwnqS9u8U/lHSJZDBQbsVNW2QgwWDR9+fO9u+sWSfrBgzCzJH7iR4JwUCykWSZSyIRDI5EK+vtHTkSgqltKPLdTboNXQaS5ZbzG1m6ZGBgc9NpFB9amlbBn+/odCyKPt7FGlu3gn68j8rtfLI3TqdRWCLYreM8v73QFBIpg2v87l7vIRCs6X6DFZqaQiLY8Kv3VCERbMBanSokgh47JV4803sIBGvZP6E9JFKn6g+qkEjNtOafaU3r8UuNWcd6D4Ggx3LGc5mlTvQ2QGHN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def: {
        1: {cateId: '1'},
        2: {cateId: '2'},
        3: {cateId: '3'},
        4: {cateId: '4'},
        13: {cateId: '13'},
        14: {cateId: '14'},
        15: {cateId: '15'},
        16: {cateId: '16'}
    },
    searchUrl: '/vod/search.html?wd=**&submit=',
    searchable: 2,//是否启用全局搜索,
    quickSearch: 0,//是否启用快速搜索,
    play_parse: true,
    lazy: async function () {
        let {input} = this;
        let html = await request(input);
        html = JSON.parse(html.match(/r player_.*?=(.*?)</)[1]);
        let url = html.url;
        if (html.encrypt == '1') {
            url = unescape(url)
        } else if (html.encrypt == '2') {
            url = unescape(base64Decode(url))
        }
        if (/m3u8|mp4/.test(url)) {
            input = url
        }
        return input
    },
    limit: 6, double: true,
    tab_exclude: '热门资讯|热播|猜你喜欢',
    推荐: 'ul.myui-vodlist;li;*;*;*;*',
    一级: '.myui-vodlist__box;a&&title;.lazyload&&data-original;.tag&&Text;a&&href',
    二级: {
        "title": "h1&&Text;.data:eq(0) a:eq(0)&&Text",
        "img": ".lazyload&&data-original",
        "desc": ";.data:eq(0) a:eq(2)&&Text;.data:eq(0) a:eq(1)&&Text;.data:eq(2)&&Text;.data:eq(3)&&Text",
        "content": ".text-collapse span&&Text",
        "tabs": ".myui-panel__head h3",
        "lists": ".myui-content__list:eq(#id) li"
    },
    搜索: 'ul.myui-vodlist__media li;*;*;*;*',
}