var rule = {
    title: '黑木耳资源[资]',
    host: 'https://www.heimuer.tv',
    homeTid: '',
    homeUrl: '/api.php/provide/vod/?ac=detail&t={{rule.homeTid}}',
    detailUrl: '/api.php/provide/vod/?ac=detail&ids=fyid',
    searchUrl: '/api.php/provide/vod/?wd=**&pg=fypage',
    url: '/api.php/provide/vod/?ac=detail&pg=fypage&t=fyfilter',
    headers: {
        'User-Agent': 'MOBILE_UA',
    },
    timeout: 5000,
    filterable: 1,
    filter_url: 'fyclass?{{fl.type}}',
    class_name: '电影&电视剧&动漫&综艺&短剧',
    class_url: '6&13&60&38&64',
    filter: 'H4sIAAAAAAAAA7WWzW7aQBDH7zwF8jmHYBs37atEPeTAqR/qoa0URZEgiABOUqBCTpO6ULVBQAoEVDVKMaYvw374LWq8akslz8xe8AV77fmxO/Pf/85RJhtfhmM8ye4fJffJ87PCYTxivD58VTB2/g2/PHhRWI+LWcA6Z5tv3h48f1P4H6Ii1p8zd7AKfVGvbkSoqPXbR8bfweOdbGr86fvoagjF79Hxns/qfSg+t0sDelX2MwABORLAS01e9ECASQNORsJrQQCTXgIvu/zkGgTQSxClZXS9BAH0EkRtxssVEGDRAPdOhLcgwKYB/RZSRjNP68AdiHYg2j9YOEtnOHQhxuey1oEmYdFp4LUPq3kdBGikIWiwygMIoNMgwpYIfCQNFp0GVrlnkzI4iU1TeJpRP+pDI2dt1az4w11sFun7lM5t1B2C0XRi+WUPjNZQ1vcpFG1qmGQDjn5M//eoL5bvIICl4U/eNBqOQADtT7GgVoEHAkxYUNbe1gXVmIpgIevz9LnR6V3L6mOIMGyNDF/2uD/CGBrnWFJmjKFxlCWVjsWKYWgbVPXGGDZccmd3uyVXu8Ed8MW31Lnl6aZHlQtj0HtayQZjaOzsRL4Iw9GQzZ+SYxhaOerMwBgWUnJ7uz1u40Z+rYjuGHIgm7Z/edXkpTOMQR8CUfFUfhljDA3pqWYTYdDSE72OnN1iDA3Xq16Idhdh5DVa95uLVVDFGBqt7/CXvHcxhkb32/bZ5DPG0LC8xVwWMY3l6QZFNs/Z5BPG0GiDVe+GMJyUfZg5/g1eH4Y6bQ4AAA==',
    limit: 20,
    multi: 1,
    searchable: 2,
    play_parse: true,
    parse_url: '',
    lazy: "js:\n      if(/\\.(m3u8|mp4)/.test(input)){\n        input = {parse:0,url:input}\n      } else {\n        if (rule.parse_url.startsWith('json:')) {\n          let purl = rule.parse_url.replace('json:','')+input;\n          let html = request(purl);\n          input = {parse:0,url:JSON.parse(html).url}\n        } else {\n          input= rule.parse_url+input;\n        }\n      }\n      ",
    推荐: 'json:list;vod_name;vod_pic;vod_remarks;vod_id;vod_play_from',
    一级: $js.toString(() => {
        let d = [];
        function modifyURL(url) {
            let lastQuestionMarkIndex = url.lastIndexOf('?');
            if (lastQuestionMarkIndex === -1) return url;

            let afterLastQuestionMark = url.slice(lastQuestionMarkIndex + 1);
            let tIndex = url.indexOf('t=');

            if (afterLastQuestionMark) {
                let newTValue = afterLastQuestionMark.split('?')[0];
                if (tIndex !== -1) {
                    let beforeT = url.substring(0, tIndex + 2);
                    let afterT = url.slice(tIndex + 2).split('&')[1] ? '&' + url.slice(tIndex + 2).split('&')[1] : '';
                    return beforeT + newTValue + afterT;
                }
            }
            return url.substring(0, lastQuestionMarkIndex);
        };
        let bata = JSON.parse(request(modifyURL(input))).list;
        bata.forEach(it => {
            d.push({
                url: it.vod_id,
                title: it.vod_name,
                img: it.vod_pic,
                desc: it.vod_remarks
            })
        });
        setResult(d)
    }),
    二级: 'js:\n      let html=request(input);\n      html=JSON.parse(html);\n      let data=html.list;\n      VOD=data[0];',
    搜索: 'json:list;vod_name;vod_pic;vod_remarks;vod_id;vod_play_from',
}