加载第三方评价信息中.......
流行度 ${popularity}
`;
rating_more.append(popularity);
} else if (text.indexOf('Reviews') !== -1) {
// TODO let reviews;
}
}
if (rating_more.html()) {
rating_more.show();
}
// add rottentomatoes block
$('#titleYear', doc).remove();
let movieTitle = $.trim($('h1[itemprop=name]', doc).text());
let rottURL = 'https://www.rottentomatoes.com/m/' + movieTitle.replace(/\s+/g,"_").replace(/\W+/g,"").toLowerCase();
getDoc(rottURL, null, function(rotdoc) {
$('#interest_sectl div.rating_rott').html(`
烂番茄新鲜度`).show();
if(!rotdoc.title){
$('#interest_sectl div.rating_rott').append(`
搜索rotta:
${movieTitle}`);
} else if($('#tomato_meter_link',rotdoc).length > 0) {
let rating_rott_value = $('#tomato_meter_link .meter-value.superPageFontColor', rotdoc).html();
$('#scoreStats .subtle.superPageFontColor', rotdoc).remove();
let fresh_rott_value = $('#scoreStats .superPageFontColor:eq(2)', rotdoc).text();
let rotten_rott_value = $('#scoreStats .superPageFontColor:eq(3)', rotdoc).text();
$('#interest_sectl .rating_rott #rottValue').append(`
${rating_rott_value}鲜: ${fresh_rott_value}
烂: ${rotten_rott_value}
`);
}
});
$("#loading_more_rate").hide();
});
}
// 如果是动漫,请求anydb的anidb、bgm、mal信息
if (is_anime) {
$("div#interest_sectl").append(`
`);
let title_list = [chinese_title,foreign_title];
let _date = Date.parse(playdate.split('/')[0]) / 1e3;
let anidb_api = "https://anydb.depar.cc/animes/query?" + title_list.map(function(t) {return "titles[]=" + t}).join("&") + "&date=" + _date;
getJSON(anidb_api,function(data1) {
let _anydb_html = "";
if (data1.success) {
let source_list = ["AniDB","Bgm","MAL"];
for (let i = 0;i < source_list.length;i++) {
let source = source_list[i];
let _data = data1.matched[source.toLowerCase()];
if (_data) {
let _group = _data.rate.match(/([\d.]+?) \((\d+)\)/);
let _rating = _group[1];
let _vote = _group[2];
let starValue = parseFloat(_rating) / 2;
starValue = starValue % 1 > 0.5 ? Math.floor(starValue) + 0.5 : Math.floor(starValue);
starValue *= 10;
_anydb_html += `
${source} 评分
${parseFloat(_rating).toFixed(1)} `;
}
}
if (_anydb_html.trim().length > 0) {
$('#interest_sectl > div.rating_anidb').html(_anydb_html).show();
}
}
$("#loading_more_rate").hide();
});
}
// 请求豆瓣附属信息
getDoc(douban_link + 'awards/',null,function (doc) {
awards = $('#content>div>div.article', doc).html()
.replace(/[ \n]/g, '')
.replace(/<\/li>
/g, ' ')
.replace(/<\/a> ]*>/g, '\n')
.replace(/<[^>]+>/g, '')
.replace(/ /g, ' ')
.replace(/ +\n/g, '\n')
.trim();
}); // 该影片的评奖信息
getJSON('https://api.douban.com/v2/movie/' + douban_id,function (data1) {
douban_average_rating = data1.rating.average || 0;
douban_votes = data1.rating.numRaters.toLocaleString() || 0;
douban_rating = douban_average_rating + '/10 from ' + douban_votes + ' users';
introduction = data1.summary.replace(/^None$/g, '暂无相关剧情介绍');
poster = data1.image.replace(/s(_ratio_poster|pic)/g, 'l');
director = data1.attrs.director ? data1.attrs.director.join(' / ') : '';
writer = data1.attrs.writer ? data1.attrs.writer.join(' / ') : '';
cast = data1.attrs.cast ? data1.attrs.cast.join('\n') : '';
tags = data1.tags.map(function (member) {
return member.name;
}).join(' | ');
}); //豆瓣评分,简介,海报,导演,编剧,演员,标签
// 获取电影名
let title = $('#content > h1 > span')[0].textContent.split(' ').shift().replace(/[,]/g," ").replace(/:.*$/,"");
let eng_title = [this_title, trans_title].join("/").split("/").filter(function (arr) {
return /([a-zA-Z]){2,}/.test(arr);
})[0] || "";
// 剧集修正季数名
eng_title = eng_title.match(/Season\s\d\d/) ? eng_title.replace(/Season\s/, "S") : eng_title.replace(/Season\s/, "S0");
eng_title = eng_title.replace(/[:,!\-]/g, "").replace(/ [^a-z0-9]+$/,"");
let eng_title_clean = eng_title.replace(/ S\d\d*$/, "");
// 日剧春夏秋冬解析
let playdate_pro = new Date(playdate.split('/')[0]);
let release_year = playdate.replace(/-.*$/,"").replace(/^\d{2}/,"");
let release_month = playdate_pro.getMonth() + 1;
let drama_season;
if ([4,5,6].includes(release_month)) {drama_season = "spring";}
else if ([7,8,9].includes(release_month)) {drama_season = "summer";}
else if ([10,11,12].includes(release_month)) {drama_season = "autumn";}
else {drama_season = "winter";}
// 电影+年份 (只有电影才搜索并赋值年份)
let encode_year = is_movie ? year.replace(/ /,"_") : "";
let nian = is_movie ? year : "";
let encode_this_title = (this_title || "").replace(/:/,"").replace(/ /g,"_");
let ptzimu = encode_this_title + encode_year;
chinese_title = chinese_title.replace(/[:,]/," ");
let gtitle = encodeToGb2312(title,true);
let utitle = encodeURI(title).replace(/%/g,"_");
let ywm = eng_title + nian;
let zwm = chinese_title + nian;
let gongwang = has_imdb ? imdb_id : douban_id;
let dbzw = has_imdb ? imdb_id : title;
if (_version === "完整版") {
let neizhan = has_imdb ? imdb_id : ('/subject/' + douban_id); // PT内站 智能判定是用IMDB ID还是豆瓣ID
let npid = has_imdb ? ('imdb=' + imdb_id) : ('douban=' + douban_id); // NPUBITS 智能判定是用IMDB ID还是豆瓣ID
let ttgid = has_imdb ? ('IMDB' + imdb_id.slice(2)) : zwm; // TTG 智能判定是用IMDB ID还是中文名
let zxid = has_imdb ? imdb_id : zwm; // ZX 智能判定是用IMDB ID还是中文名
site_map.push({
name: "PT影视顶配",
label: [
{name: "CHDBits", link: 'https://chdbits.co/torrents.php?incldead=1&search_area=1¬newword=1&search=' + neizhan,},
{name: "CMCT", link: 'https://hdcmct.org/torrents.php?incldead=1&search_area=1¬newword=1&search=' + neizhan,},
{name: "HDChina", link: 'https://hdchina.org/torrents.php?incldead=1&search_area=1¬newword=1&search=' + neizhan, selector: "table.torrent_list:last > tbody > tr:gt(0)"},
{name: "HDSky", link: 'https://hdsky.me/torrents.php?incldead=1&search_area=1¬newword=1&search=' + neizhan,},
{name: "MTeam", link: 'https://tp.m-team.cc/torrents.php?incldead=1&search_area=1¬newword=1&search=' + neizhan,},
{name: "TTG", link: 'https://totheglory.im/browse.php?c=M¬newword=1&search_field=' + ttgid, selector: "table#torrent_table:last > tbody > tr:gt(0)"},
]
});
site_map.push({
name: "PT影视标配",
label: [
{name: "BTSchool", link: 'http://pt.btschool.net/torrents.php?incldead=1&search_area=1¬newword=1&search=' + neizhan,/* selector: "table.torrents:last > tbody > tr:gt(0)"}, */},
{name: "CCFBits", link: 'http://www.ccfbits.org/browse.php?fullsearch=1¬newword=1&search=' + neizhan, selector: 'td[style="border:none;text-align:left"] a[title]'},
{name: "GZTown", link: 'https://pt.gztown.net/torrents.php?incldead=1&search_area=1¬newword=1&search=' + neizhan,},
{name: "FRDS", link: 'http://pt.keepfrds.com/torrents.php?incldead=1&search_area=1¬newword=1&search=' + neizhan,},
{name: "HDCity", link: 'https://hdcity.city/pt?incldead=1&search_area=1¬newword=1&iwannaseethis=' + neizhan, selector: "center > div > div > div.text"},
{name: "HDHome", link: 'https://hdhome.org/torrents.php?incldead=1&search_area=1¬newword=1&search=' + neizhan,},
{name: "HDFANS", link: 'https://pt.hd4fans.org/torrents.php?incldead=1&search_area=1¬newword=1&search=' + neizhan,},
{name: "HDTime", link: 'https://hdtime.org/torrents.php?incldead=1&search_area=1¬newword=1&search=' + neizhan,},
{name: "HDU", link: 'http://pt.upxin.net/torrents.php?incldead=1&search_area=1¬newword=1&search=' + neizhan,},
{name: "Hyperay", link: 'https://hyperay.org/torrents.php?incldead=1&search_area=1¬newword=1&search=' + neizhan, selector: "table.torrents > tbody > tr.nonstick_outer_bg"},
{name: "JoyHD", link: 'https://www.joyhd.net/torrents.php?incldead=1&search_area=1¬newword=1&search=' + neizhan,},
{name: "MHZ", link: 'https://pt.meihezi.com/torrents.php?incldead=1&search_area=4¬newword=1&search=' + douban_id,},
{name: "OurBits", link: 'https://ourbits.club/torrents.php?incldead=1&search_area=1¬newword=1&search=' + neizhan,},
{name: "OurDiSC", link: 'http://bt.ourdisc.net/browse.php?incldead=0¬newword=1&search=' + title, selector: "table[width='100%'][border='0'][cellspacing='0'][cellpadding='10'] i"},
{name: "PlayPT", link: 'http://pt.playpt123.org/play.php?search_area=1¬newword=1&search=' + neizhan,},
{name: "TCCF", link: 'https://et8.org/torrents.php?incldead=1&search_area=1¬newword=1&search=' + neizhan,},
{name: "TLFBits", link: 'http://pt.eastgame.org/torrents.php?incldead=1&search_area=1¬newword=1&search=' + neizhan,},
]
});
if(is_anime){
site_map.push({
name: "PT动漫游戏",
label: [
{name: "SkySnow", link: 'https://skyeysnow.com/forum.php?mod=torrents¬newword=1&search=' + title + nian, selector: "table.torrents > tbody > tr:gt(0)"},
{name: "SolaGS", link: 'https://solags.org/torrents.php?incldead=1&search_area=0¬newword=1&search=' + this_title + nian,},
{name: "U2", link: 'https://u2.dmhy.org/torrents.php?incldead=1&search_area=0¬newword=1&search=' + this_title + nian,},
]
});
}
site_map.push({
name: "PT影视教育",
label: [
{name: "BYRBT", link: 'https://bt.byr.cn/torrents.php?incldead=1&search_area=1¬newword=1&search=' + neizhan,},
{name: "HUDBT", link: 'https://hudbt.hust.edu.cn/torrents.php?incldead=1&search_area=1¬newword=1&search=' + neizhan,},
{name: "NPUBITS", link: 'https://npupt.com/torrents.php?incldead=1&search_area=1¬newword=1&' + npid, selector: "#torrents_table > tbody > tr:gt(0)"},
{name: "NWSUAF", link: 'https://pt.nwsuaf6.edu.cn/torrents.php?incldead=1&search_area=1¬newword=1&search=' + neizhan,},
{name: "NYPT", link: 'https://nanyangpt.com/torrents.php?incldead=1&search_area=1¬newword=1&search=' + neizhan, selector: "table.torrents:last > tbody > tr"},
{name: "SJTU", link: 'https://pt.sjtu.edu.cn/torrents.php?incldead=1&search_area=1¬newword=1&search=' + neizhan, selector: "table.torrents:last > tbody > tr"},
{name: "WHUPT", link: 'https://pt.whu.edu.cn/torrents.php?incldead=1&search_area=1¬newword=1&search=' + neizhan, selector: "table.torrents:last > tbody > tr"},
{name: "ZX", link: 'http://pt.zhixing.bjtu.edu.cn/search/x' + zxid + '-notnewword=1/', selector: "table.torrenttable > tbody > tr:gt(1)"},
]
});
if(has_imdb){
site_map.push({
name: "PT影视外站",
label:[
{name: "AB", link: 'https://animebytes.tv/torrents.php?searchstr=' + ywm, selector: "div.thin > div.group_cont"},
{name: "ADC", link: 'http://asiandvdclub.org/browse.php?descr=1&btnSubmit=Search%21&search=' + imdb_id, selector: "table.torrenttable:last > tbody > tr"},
{name: "AOX", link: 'https://aox.to/index.php?page=torrents&options=4&search=' + imdb_id, selector: "table.table.table-bordered:last > tbody > tr:gt(0)"},
{name: "AR", link: 'https://alpharatio.cc/torrents.php?searchstr=' + ywm, selector:"#torrent_table > tbody > tr:gt(0)"},
{name: "AT", link: 'https://animetorrents.me/torrents.php?search=' + eng_title, ajax: 'https://animetorrents.me/ajax/torrents_data.php?total=1&search=' + eng_title + '&SearchSubmit=&page=1' , headers:{"x-requested-with": "XMLHttpRequest"}, rewrite_href:false, selector:'table.dataTable > tbody > tr:nth-child(2)', selector_need_login:"h1.headline strong:contains('Access Denied!')"},
{name: "AVZ", link: 'https://avistaz.to/torrents?in=1&search=' + ywm, selector:"table.table-condensed.table-striped.table-bordered:last > tbody > tr:gt(0)"},
{name: "BakaBT", link: 'https://bakabt.me/browse.php?q=' + ywm, selector:"table.torrents > tbody > tr:gt(0)", selector_need_login:"#loginForm"},
{name: "BHD", link: 'https://beyond-hd.me/browse.php?incldead=0&search=' + imdb_id, selector:"table.tb_detail.grey.torrenttable:last > tbody > tr:gt(0)"},
{name: "CC", link: 'http://www.cartoonchaos.org/index.php?page=torrents&options=0&active=1&search=' + ywm, selector:"table > tbody > tr:nth-child(2) > td > table > tbody > tr:nth-child(2) > td > table > tbody > tr:gt(0)",selector_need_login:"table[style='border-color:#E70000']"},
{name: "HDF", link: 'https://hdf.world/torrents.php?searchstr=' + ywm, selector:"#torrent_table > tbody > tr:gt(0)"},
{name: "HDME", link: 'http://hdme.eu/browse.php?incldead=1&blah=1&search=' + imdb_id, selector:"table:nth-child(13) > tbody > tr"},
{name: "HDMonkey", link: 'https://hdmonkey.org/torrents-search.php?incldead=0&search=' + ywm, selector: "table.ttable_headinner > tbody > tr:gt(0)"},
{name: "HDS", link: 'https://hd-space.org/index.php?page=torrents&active=1&options=2&search=' + imdb_id, selector: "table.lista:last > tbody > tr:gt(0)",selector_need_login:"form[name='login']"},
{name: "HDT", link: 'https://hd-torrents.org/torrents.php?active=1&options=2&search=' + imdb_id, selector: "table.mainblockcontenttt b",selector_need_login:"form[name='login']"},
{name: "ILC", link: 'http://www.iloveclassics.com/browse.php?searchin=2&search=' + imdb_id, selector: "#hover-over > tbody > tr.table_col1:gt(0)"},
{name: "IPT", link: 'https://iptorrents.com/t?qf=all&q=' + imdb_id, selector: "#torrents td.ac"},
{name: "JPOP", link: 'https://jpopsuki.eu/torrents.php?searchstr=' + eng_title, selector: "#torrent_table > tbody > tr:gt(0)"},
{name: "NetHD", link: 'http://nethd.org/torrents.php?incldead=1&search_area=4&search=' + imdb_id, selector: "table.table.table-bordered.torrent > tbody > tr:gt(1)"},
{name: "PHD", link: 'https://privatehd.to/torrents?in=1&search=' + ywm, selector: "table.table-condensed.table-striped.table-bordered:first > tbody > tr:gt(0)"},
{name: "PTF", link: 'http://ptfiles.net/browse.php?incldead=0&title=0&search=' + ywm, selector: "#tortable > tbody > tr.rowhead:gt(0)"},
{name: "SC", link: 'https://secret-cinema.pw/torrents.php?cataloguenumber=' + imdb_id, selector: "div.torrent_card"},
{name: "Speed", link: 'https://speed.cd/browse.php?d=on&search=' + imdb_id, selector: "div.boxContent > table:first >tbody > tr:gt(0)"},
{name: "TD", link: 'https://www.torrentday.com/t?q=' + imdb_id, selector: "#torrentTable td.torrentNameInfo"},
{name: "TS", link: 'https://www.torrentseeds.org/browse.php?searchin=title&incldead=0&search=%22' +eng_title +year + '%22', selector: "table.table.table-bordered > tbody > tr.browse_color:gt(0)"},
{name: "TT", link: 'https://revolutiontt.me/browse.php?search=' + imdb_id, selector: "table#torrents-table > tbody > tr:gt(0)"},
{name:"TL",type:"json",link:"https://www.torrentleech.org/torrents/browse/index/query/" + eng_title + nian, ajax: "https://www.torrentleech.org/torrents/browse/list/query/" + eng_title + year, selector:"numFound > 0"},
{name: "UHD",link: 'https://uhdbits.org/torrents.php?searchstr=' + imdb_id, selector: "table.torrent_table > tbody > tr.group"},
{name: "WOP", link: 'http://worldofp2p.net/browse.php?incldead=0&searchin=descr&search=' + imdb_id, selector: "table.yenitorrenttable:last > tbody > tr:gt(0)"},
]
});
site_map.push({
name: "PT影视原声",
label: [
{name: "OpenCD", link: 'https://open.cd/torrents.php?incldead=1&search_area=0¬newword=1&search=' + title, selector: "table.torrents:last > tbody > tr:gt(0)"},
{name: "Apollo", link: 'https://apollo.rip/torrents.php?searchstr=' + eng_title, selector:"#torrent_table:last > tbody > tr.group_torrent:gt(0)"},
{name: "Red", link: 'https://redacted.ch/torrents.php?searchstr=' + eng_title, selector: "#torrent_table > tbody > tr.group_torrent:gt(0)"},
{name: "Waffles", link: 'https://waffles.ch/browse.php?q=' + eng_title, selector: "#browsetable:last > tbody > tr:gt(0)"},
]
});
site_map.push({
name: "NZB影视资源",
label:[
{name: "DOGnzb", link: 'https://dognzb.cr/search?q=' + ywm,selector: "#featurebox > table > tbody > tr > td > table > tbody > tr.odd:gt(0)"},
{name: "LuluNZB", link: 'https://lulunzb.com/search/' + ywm, selector: "#browsetable > tbody > tr:gt(0)", selector_need_login:"div.login-box"},
{name: "Miatrix",link: 'https://www.miatrix.com/search/' + ywm,selector: "#browsetable > tbody > tr:gt(0)"},
{name: "NewzTown",link: 'https://newztown.co.za/search/' + ywm,selector: "#browsetable > tbody > tr:gt(0)"},
{name: "NZBCat",link: 'https://nzb.cat/search/' + ywm,selector: "#browsetable > tbody > tr:gt(0)"},
{name: "NZBgeek",link: 'https://nzbgeek.info/geekseek.php?moviesgeekseek=1&browsecategory=&browseincludewords=' + ywm,selector: "table > tbody > tr.HighlightTVRow2:gt(0)", selector_need_login:"input[value='do_login']"},
{name: "NZBP", link: 'https://nzbplanet.net/search/' + ywm, selector: "#browsetable > tbody > tr:gt(0)"},
{name: "Oznzb", link: 'https://www.oznzb.com/search/' + ywm, selector: "#browsetable > tbody > tr.ratingReportContainer:gt(0)", selector_need_login:"#login"},
{name: "SNZB", link: 'https://simplynzbs.com/search/' + ywm, selector: "#browsetable > tbody > tr:gt(0)"},
]
});
}
if(!is_mandarin){
site_map.push({
name: "PT影视字幕",
label:[
{name:"BYRBT®", link: "https://bt.byr.cn/subtitles.php?notnewword=1&search=" + ptzimu, selector: "table:last > tbody > tr:gt(1)"},
{name:"CHDBits®", link: "https://chdbits.co/subtitles.php?notnewword=1&search=" + ptzimu, selector: "table:last > tbody > tr:gt(1)"},
{name:"CMCT®", link: "https://hdcmct.org/subtitles.php?notnewword=1&search=" + ptzimu, selector: "table:last > tbody > tr:gt(1)"},
{name:"FRDS®", link: "http://pt.keepfrds.com/subtitles.php?notnewword=1&search=" + ptzimu, selector: "table[width='940'][border='1'][cellspacing='0'][cellpadding='5'] > tbody > tr:nth-child(2)"},
{name:"HDChina®", link: "https://hdchina.org/subtitles.php?notnewword=1&search=" + ptzimu, selector: "table.uploaded_sub_list > tbody > tr:gt(1)"},
{name:"HDCity®", link: "https://hdcity.city/subtitles?notnewword=1&search=" + ptzimu, selector: "center > div:nth-child(1) > table > tbody > tr:nth-child(2)"},
{name:"HDHome®", link: "https://hdhome.org/subtitles.php?notnewword=1&search=" + ptzimu, selector: "table:last > tbody > tr:gt(1)"},
{name:"HDSky®", link: "https://hdsky.me/subtitles.php?notnewword=1&search=" + ptzimu, selector: "table:last > tbody > tr:gt(1)"},
{name:"HDTime®", link: "https://hdtime.org/subtitles.php?notnewword=1&search=" + ptzimu, selector: "table[width='100%'][border='1'][cellspacing='0'][cellpadding='5'] > tbody > tr"},
{name:"HDU®", link: "http://pt.upxin.net/subtitles.php?notnewword=1&search=" + ptzimu, selector: "table[width='940'][border='1'][cellspacing='0'][cellpadding='5'] > tbody > tr:nth-child(2)"},
{name:"Hyperay®", link: "https://hyperay.org/subtitles.php?notnewword=1&search=" + ptzimu, selector: "table[width='940'][border='1'][cellspacing='0'][cellpadding='5'] > tbody > tr:nth-child(2)"},
{name:"JoyHD®", link: "https://www.joyhd.net/subtitles.php?notnewword=1&search=" + ptzimu, selector: "table[width='940'][border='1'][cellspacing='0'][cellpadding='5'] > tbody > tr:nth-child(2)"},
{name:"MTeam®", link: "https://tp.m-team.cc/subtitles.php?notnewword=1&search=" + ptzimu, selector: "table.table-subtitle-list:last > tbody > tr"},
{name:"NPUBITS®", link: "https://npupt.com/subtitles.php?notnewword=1&search=" + ptzimu, selector: "#main > table > tbody > tr:nth-child(2)"},
{name:"NYPT®", link: "https://nanyangpt.com/subtitles.php?notnewword=1&search=" + ptzimu, selector: "table[width='940'][border='1'][cellspacing='0'][cellpadding='5'] > tbody > tr:nth-child(2)"},
{name:"OurBits®", link: "https://ourbits.club/subtitles.php?notnewword=1&search=" + ptzimu, selector: "table[width='940'][border='1'][cellspacing='0'][cellpadding='5'] > tbody > tr:nth-child(2)"},
{name:"SJTU®", link: "https://pt.sjtu.edu.cn/subtitles.php?notnewword=1&search=" + ptzimu, selector: "table[width='940'][border='1'][cellspacing='0'][cellpadding='5'] > tbody > tr:nth-child(2)"},
{name:"TCCF®", link: "https://et8.org/subtitles.php?notnewword=1&search=" + ptzimu, selector: "table[width='940'][border='1'][cellspacing='0'][cellpadding='5'] > tbody > tr:nth-child(2)"},
{name:"TLFBits®", link: "http://pt.eastgame.org/subtitles.php?notnewword=1&search=" + ptzimu, selector: "table[width='940'][border='1'][cellspacing='0'][cellpadding='5'] > tbody > tr:nth-child(2)"},
{name:"U2®", link: "https://u2.dmhy.org/subtitles.php?notnewword=1&search=" + ptzimu, selector: "table[width='940'][border='1'][cellspacing='0'][cellpadding='5'] > tbody > tr:nth-child(2)"},
{name:"WHUPT®", link: "https://pt.whu.edu.cn/subtitles.php?notnewword=1&search=" + ptzimu, selector: "table.no-vertical-line:last > tbody > tr"},
]
});
}
}
if(!is_mandarin){
site_map.push({
name: "中文影视字幕",
label:[
{name:'字幕库', link:'http://www.zimuku.cn/search?q=' + title,selector:'div.box.clearfix div.item.prel.clearfix'},
{name:'字幕天堂',method:"post", link:'http://www.zmtiantang.com/e/search/',data:`keyboard=${title}&show=title&classid=1,3&tempid=1`,headers:{"Content-Type": "application/x-www-form-urlencoded"},rewrite_href:true,selector:'table.data > tbody > tr:nth-child(2)'},
{name:'字幕组', link:'http://www.zimuzu.tv/search/index?type=subtitle&keyword=' + title,selector:".search-result li"},
{name:'sub HD', link:'http://subhd.com/search/' + title,selector:"div.col-md-9 div.box"},
{name:'伪射手', link:'http://assrt.net/sub/?searchword=' + title,selector:"#resultsdiv a.introtitle"},
{name:'163字幕', link:'http://www.163sub.com/Search?id=' + title,selector:"#main_narrow_bd div.subs_list"},
{name:'电波字幕', link:'http://dbfansub.com/?s=' + title,selector:"div.panel-body article.panel.panel-default.archive"},
{name:'字幕社', link:'https://www.zimushe.com/search.php?keywords=' + title,selector:"div.wrap-l li"},
{name:'中文字幕网', link:'http://www.zimuzimu.com/so_zimu.php?title=' + title,selector:"table.sublist a.othersub"},
{name:'r3sub', link:'https://r3sub.com/search.php?s=' + title,selector:"div.col-sm-8.col-md-9.col-lg-8 div.movie.movie--preview.ddd"},
{name:'HDZIMU', link:'http://www.hdzimu.com/?s=' + title,selector:'div.post-warp div.post-box'},
{name:'M1080', link:'http://zimu.m1080.com/search.asp?a=&s=' + title,selector:"table td"},
{name:'OpenSub', link:'https://www.opensubtitles.org/zh/search/sublanguageid-chi,zht,zhe,eng/imdbid-' + imdb_id,selector:"#search_results tr.change"},
]
});
}
if(has_imdb){
site_map.push({
name: "英文影视字幕",
label:[
{name:'Addic7ed', link:'http://www.addic7ed.com/search.php?search=' + eng_title_clean + year,selector:"table.tabel tr"},
{name:'Podnapisi', link:'https://www.podnapisi.net/zh/subtitles/search/?language=zh&language=en&keywords=' + eng_title_clean + '&' + year + '-' + year,selector:"table tr.subtitle-entry"},
{name:'Subscene', link:'https://subscene.com/subtitles/release?r=true&q=' + ywm,selector:"table td.a1"},
{name:'TVsubs', link:'http://tvsubs.net/search.php?q=' + eng_title_clean,selector:"div.cont li"},
{name:'TVsubtitles', link:'http://www.tvsubtitles.net/search.php?q=' + eng_title_clean,selector:"div.left_articles li"},
{name:'YIFY', link:'http://www.yifysubtitles.com/search?q=' + eng_title_clean,selector:"div.col-sm-12 div.col-xs-12"},
]
});
}
site_map.push({
name: "影视精准匹配",
label:[
{name:'BT人人', link:'http://www.btrenren.com/index.php/Search/index.html?search=' + dbzw,selector:'div.ml p.des'},
{name:'BT天堂', link:'http://www.bttt.la/s.php?q=' + gongwang,selector:'div.ml div.title'},
{name:'RARBT', link:'http://www.rarbt.com/index.php/search/index.html?search=' + dbzw,selector:'div.ml div.title'},
{name:'爱笑聚', link:'http://www.aixiaoju.com/app-index-run?app=search&csrf_token=f053020a8e4af2e4&keywords=' + dbzw,selector:'div.search_content div.text'},
{name:'电影传送门', link:'http://www.dycsm.com/Mov/so/' + gongwang,selector:'div.movieList div.info'},
{name:'胖鸟电影', link:'http://www.pniao.com/Mov/so/' + gongwang,selector:`div.title a:contains(${title})`},
{name:'一起看电影', link:'http://www.17kys.com/Search.jsp?q=' + gongwang,selector:'div.moviebox div.col-md-3-1-moviecontent'},
{name:'追高清', link:'http://www.zhuihd.com/?s=' + gongwang,selector:'#main li.entry-title'},
]
});
site_map.push({
name: "在线正版影视",
label:[
{name:'爱奇艺视频', link:'https://so.iqiyi.com/so/q_' + title,selector:"div.mod_result span.play_source"},
{name: '哔哩哔哩', link: 'https://search.bilibili.com/all?keyword=' + title,ajax:"https://search.bilibili.com/api/search?search_type=all&keyword=" + title,type:"json",selector: 'result.media_bangumi.length > 0 || par.result.media_ft.length > 0'},
{name:'乐视视频', link:'http://so.le.com/s?wd=' + title,selector:`h1 > a.j-baidu-a[title*='${title}']`},
{name:'搜狐视频', link:'https://so.tv.sohu.com/mts?wd=' + title,selector:'div.wrap.cfix div.cfix.resource'},
{name:'腾讯视频', link:'https://v.qq.com/x/search/?q=' + title,selector:'div.wrapper_main div._infos'},
{name:'优酷视频', link:'http://so.youku.com/search_video/q_' + title,ajax:'http://www.soku.com/m/y/video?q=' + title,selector:'div.yk_dir div.card_info'},
]
});
site_map.push({
name: "在线影视视频",
label:[
{name:'4K屋', link:'http://www.4kwu.cc/?m=vod-search&wd=' + title,selector:'div.tv-bd.search-list div.item_txt'},
{name:'AAQQS', link:'http://aaxxy.com/vod-search-pg-1-wd-' + title + '.html',selector:'#find-focus li'},
{name:'Neets', link:'http://neets.cc/search?key=' + title,selector:'#search_li_box div.search_li.clearfix'},
{name:'Q2电影网', link:'http://www.q2002.com/search?wd=' + title,selector:'div.container div.movie-item'},
{name:'霸气村', link:'http://www.baqicun.co/search.php?searchword=' + title,selector:'div.k_sou div.k_sou-4'},
{name:'电影盒子', method:"post", link:'http://www.5iwanyouxi.com/index.php?s=vod-search-name&wd=' + title,data:`wd=${title}`,headers:{"Content-Type": "application/x-www-form-urlencoded"},rewrite_href:true, selector:'div.v_tb div.v_txt'},
{name:'哈哩哈哩', link:'http://www.halihali.cc/search/?wd=' + title,selector:'#contents div.info'},
{name:'嗨哆咪影视', link:'http://www.haiduomi.com/index.php?m=vod-search-wd-' + title,selector:'div.fed-layouts.fed-bgc-whits.fed-margin-right h3.fed-elip'},
{name:'魔力电影网', link:'http://www.magbt.net/search.php?searchword=' + title,selector:'#content li.listfl'},
{name: '全看网', link: 'http://www.quankan.tv/index.php?s=vod-search-wd-' +title + '.html' ,headers:{"X-Requested-With": "XMLHttpRequest"},ajax:"http://www.quankan.tv/index.php?s=vod-search-wd-" + title + "-1-ajax",type:"json",selector: 'data.count && parseInt(par.data.count) > 0'},
{name:'小朱视频', link:'http://noad.pigguli.com/search/' + title + '.html',selector:'div.b-listtab-main li.item'},
{name:'新论语', link:'http://www.xinlunyu.com/index.php?m=vod-search&wd=' + title,selector:'div.col-xs-12 div.meta'},
{name:'左手吃斋', link:'https://www.zsczys.com/index.php?m=vod-search&wd=' + title,selector:'div.col-xs-12 div.meta'},
]
});
if(is_anime){
site_map.push({
name: "在线动漫视频",
label:[
{name:'9ANIME', link:'https://www4.9anime.is/search?keyword=' + eng_title,selector:"div.film-list a.name"},
{name:'次元壁', link:'http://www.ciyuan.bi/Search?keyword=' + title,selector:'div.search_left_container div.search_list_box_right'},
{name:'新世界动漫', link:'http://www.x4jdm.com/index.php?m=vod-search&wd=' + title,selector:'div.oh div.dhp'},
]
});
}
if(is_anime){
site_map.push({
name: "动漫国内网站",
label:[
{name:'ACG.RIP', link:'https://acg.rip/?term=' + title,selector:'tbody tr'},
{name:'ACG狗狗', link:'http://bt.acg.gg/search.php?keyword=' + title,selector:'tbody p.original.download'},
{name:'ACG搜', link:'http://www.acgsou.com/search.php?keyword=' + title,selector:'tbody span.bts_1'},
{name:'D动漫', link:'http://dm1080p.com/?s=' + title,selector:`h1.entry-title a:contains(${title})`},
{name:'Mikan', link:'https://mikanani.me/Home/Search?searchstr=' + title,selector:'table.table.table-striped.tbl-border.fadeIn a.magnet-link-wrap'},
{name:'VCB-S', link:'https://vcb-s.com/?s=' + title,selector:'#article-list div.title-article'},
{name:'爱恋动漫', link:'http://www.kisssub.org/search.php?keyword=' + title,selector:'tbody span.bts_1'},
{name:'动漫花园', link:'https://share.dmhy.org/topics/list?keyword=' + title,selector:'tbody span.btl_1'},
{name:"萌番组", method:"post",type:"json",link:"https://bangumi.moe/search/title#search_"+title,ajax:"https://bangumi.moe/api/v2/torrent/search",data:`{"query":"${title}"}`,headers:{"Content-Type": "text/plain;charset=UTF-8"},selector: "count > 0"},
{name:'喵搜', link:'https://nyaso.com/dong/' + title +'.html',selector:'tbody a.down'},
{name:'魔法少女', link:'https://www.mahou-shoujo.moe/?s=' + this_title,selector:'#main div.entry-summary'},
{name:'旋风动漫', link:'http://share.xfsub.com:88/search.php?keyword=' + title,selector:'#listTable span.bts_1'},
{name:'怡萱动漫', link:'http://www.yxdm.tv/search.html?title=' + title,selector:'div.main p.stars1'},
]
});
}
if(is_anime && eng_title.trim().length > 0){
site_map.push({
name: "动漫国外网站",
label:[
{name:'AniDex', link:'https://anidex.info/?q=' + eng_title,selector:'div.table-responsive tr'},
{name:'AniRena', link:'https://www.anirena.com/?s=' + eng_title,selector:'#content table'},
{name:'AniTosho', link:'https://animetosho.org/search?q=' + eng_title,selector:'#content div.home_list_entry'},
{name:'Nyaa', link:'https://nyaa.si/?q=' + eng_title,selector:'div.table-responsive tr.default'},
{name:'ニャパンツ', link:'https://nyaa.pantsu.cat/search?c=_&q=' + eng_title,selector:'#torrentListResults tr.torrent-info'},
{name:'东京図书馆', link:'https://www.tokyotosho.info/search.php?terms=' + eng_title,selector:'table.listing td.desc-top'},
]
});
}
if(is_series && is_europe){
site_map.push({
name: "欧美剧集下载",
label:[
{name:'592美剧', method:"post", link:'http://www.592meiju.com/search--1.html?wd=' + title,data:`wd=${title}`,headers:{"Content-Type": "application/x-www-form-urlencoded"},rewrite_href:true, selector:'div.serach-box div.info'},
{name:'KPPT', link:'https://www.kppt.cc/search.php?q=' + title,selector:'div.search span.SearchAlias'},
{name:'爱美剧', link:'https://22v.net/search/' + title,selector:'div.movie span'},
{name:'美剧吧', link:'http://www.meiju8.cc/search.php?kw=' + title,selector:'div.box_bg_r ul.list_20'},
{name:'美剧粉', link:'http://www.itvfans.com/?s=' + title,selector:'#main-wrap-left div.home-blog-entry-text'},
{name:'美剧天堂',method:"post", link:'http://www.meijutt.com/search.asp?searchword='+ gtitle,ajax:'http://www.meijutt.com/search.asp', data:`searchword=${gtitle}`,headers:{"Content-Type": "application/x-www-form-urlencoded"},selector:'div.list3_cn_box ul.list_20'},
{name:'人人影视', link:'http://www.zimuzu.tv/search?type=resource&keyword=' + title,selector:"div.search-result > ul > li"},
{name:'人人美剧', link:'http://www.yyetss.com/Search/index/s_keys/' + title,selector:'div.row div.col-xs-3'},
{name:'天天看美剧', link:'http://www.msj1.com/?s=' + title,selector:'div.cat_list div.art_show_top'},
{name:'天天美剧', link:'http://www.ttmeiju.vip/index.php/search/index.html?keyword=' + title,selector:'table.latesttable tr.Scontent1'},
]
});
}
if(is_series && is_japan && !is_anime){
site_map.push({
name: "日剧资源下载",
label:[
{name:'91日剧', link:'http://www.91riju.com/?s=' + title,selector:`h2.entry-title > a:contains(${title})`},
{name:'搬运自留地', link:'https://blog.aipanpan.com/?s=' + title,selector:`h2.entry-title > a:contains(${title})`},
{name:'花泽工坊', link:'https://discuss.huayiwork.com/?q=' + title,ajax:"https://discuss.huayiwork.com/api/discussions?include=startUser%2ClastUser%2CrelevantPosts%2CrelevantPosts.discussion%2CrelevantPosts.user%2CstartPost%2Ctags&filter%5Bq%5D="+ title +"&",type:"json",selector:'data.length > 0'},
{name:'隐社', link:'http://www.hideystudio.com/drama/' + release_year + drama_season + '.html',selector:`td > span.titles:contains(${title})`},
{name:'追新番',method:"post", link:'http://www.zhuixinfan.com/search.php?searchsubmit=yes',data:`mod=tvplay&formhash=453fc7da&srchtype=title&srhfid=0&srhlocality=main%3A%3Aindex&srchtxt=${title}&searchsubmit=true`,headers:{"Content-Type": "application/x-www-form-urlencoded"},rewrite_href:true,selector:'#wp td.td2'},
]
});
}
if(is_series && is_thai && !is_anime){
site_map.push({
name: "泰剧资源下载",
label:[
{name:'97泰剧网', link:'http://www.97taiju.com/index.php?s=vod-search&wd=' + title,selector:'#vodlist dd.title'},
{name:'泰剧资料馆', link:'http://www.taijuzlg.com/?s=泰剧下载 ' + title,selector:'#main li.entry-title'},
]
});
}
if(is_document){
site_map.push({
name: "纪录片下载站",
label:[
{name:'纪录片天地', link:'https://www.google.com/search?q=site:www.jlpcn.net intitle:' + title,selector:'#center_col h3.r'},
]
});
}
site_map.push({
name: "电影资源下载",
label:[
{name:'52 Movie', link:'http://www.52movieba.com/search.htm?keyword=' + title,selector:'table.table.table-hover.threadlist tr.thread.tap'},
{name:'80s电影', method:"post", link:'https://www.80s.ai/search#search_'+title,data:`keyword=${title}`,headers:{"Content-Type": "application/x-www-form-urlencoded"},selector:'#search-list-group a.list-group-item'},
{name:'80s手机', method:"post", link:'https://www.80s.tw/search#search_'+title,data:`keyword=${title}`,headers:{"Content-Type": "application/x-www-form-urlencoded"},selector:'#block3 i.fa.fa-film'},
{name:'97电影网', link:'http://www.id97.com/search?q=' + title,selector:'div.container div.col-xs-7'},
{name:'BD影视', link:'http://www.bd-film.co/search.jspx?q=' + title,selector:'div.dfg-video-list div.title'},
{name:'CK电影', link:'http://www.ck180.net/search.html?q=' + title,selector:'ul.serach-ul div.info'},
{name:'LOL电影', link:'http://www.993dy.com/index.php?m=vod-search&wd=' + title,selector:'div.movielist a.play-img'},
{name:'爱下电影网', link:'http://www.aixia.cc/plus/search.php?searchtype=titlekeyword&q=' + title,selector:'div.con li'},
{name:'比特大雄', link:'https://www.btdx8.com/?s=' + title,selector:'#content div.post.clearfix'},
{name:'比特影视', link:'https://www.bteye.com/search/' + title,selector:'#main div.item'},
{name:'第一电影网', link:'https://www.001d.com/?s=' + title,selector:'div.mainleft div.info'},
{name:'电影巴士', link:'http://www.dy8c.com/?s=' + title,selector:'#content div.post-box'},
{name:'电影港', method:"post", link:'http://so.dygang.net/e/search/index.php',data:`tempid=1&tbname=article&keyboard=${gtitle}&show=title%2Csmalltext&Submit=%CB%D1%CB%F7`,headers:{"Content-Type": "application/x-www-form-urlencoded"},rewrite_href:true, selector:"table[width='100%'][border='0'][cellspacing='0'][cellpadding='0'] a.classlinkclass"},
{name:'电影首发站', link:'http://www.dysfz.cc/key/' + title + '/',selector:'.movie-list li'},
{name:'电影天堂', method:"post", link:'https://www.dy2018.com/e/search/index.php',data:`show=title%2Csmalltext&tempid=1&keyboard=${gtitle}&Submit=%C1%A2%BC%B4%CB%D1%CB%F7`,headers:{"Content-Type": "application/x-www-form-urlencoded"},rewrite_href:true, selector:'div.co_content8 table'},
{name:'嘎嘎影视', link:'http://www.gagays.xyz/movie/search?req%5Bkw%5D=' + title,selector:'#movie-sub-cont-db div.large-movie-detail'},
{name:'高清888', link:'https://www.gaoqing888.com/search?kw=' + title,selector:'div.wp-content div.video-row'},
{name:'高清MP4', link:'http://www.99tvs.com/?s=' + title,selector:'#post_container li'},
{name:'高清电台', link:'https://gaoqing.fm/s.php?q=' + title,selector:'#result1 div.row'},
{name:'高清控', link:'http://www.gaoqingkong.com/?s=' + title,selector:'#post_container div.post_hover'},
{name:'户户盘', method:"post", link:'http://huhupan.com/e/search/index.php',data:`keyboard=${title}&show=title&tempid=1&tbname=news&mid=1&depost=search`,headers:{"Content-Type": "application/x-www-form-urlencoded"},rewrite_href:true, selector:'div.main h2'},
{name:'界绍部', link:'http://www.jsb456.com/?s=' + title,selector:'#content h2.title'},
{name:'蓝光网', link:'http://www.languang.co/?s=' + title,selector:'div.mi_cont li'},
{name:'老司机电影', link:'http://www.lsjdyw.net/search/?s=' + title,selector:'div.row div.row.list.shadow'},
{name:'美剧鸟', link:'http://www.meijuniao.com/index.php?s=vod-search-wd-' + title + '.html',headers:{"X-Requested-With": "XMLHttpRequest"},ajax:"http://www.meijuniao.com/index.php?s=vod-search-wd-" + title + "-1-ajax",type:"json",selector:'data.count > 0'},
{name:'迷你MP4', link:'http://www.minimp4.com/search?q=' + title,selector:'div.container div.col-xs-7'},
{name:'泡饭影视', link:'http://www.chapaofan.com/search/' + title,selector:`li a[title*='${title}']`},
{name:'片源网', link:'http://pianyuan.net/search?q=' + title,selector:'div.row ul.detail'},
{name:'人生05', link:'http://www.rs05.com/search.php?s=' + title,selector:'#movielist li'},
{name:'新6V电影', method:"post", link:'https://www.66s.cc/e/search/index.php',data:`show=title&tempid=1&tbname=article&mid=1&dopost=search&submit=&keyboard=${title}`,headers:{"Content-Type": "application/x-www-form-urlencoded"},rewrite_href:true, selector:'#post_container div.entry_post'},
{name:'迅影网', link:'http://www.xunyingwang.com/search?q=' + title,selector:'div.row p.movie-name'},
{name:'扬天影视', link:'https://www.mcyt.cn/?s=' + title,selector:'div.mainleft div.info'},
{name:'一只大榴莲', link:'http://www.llduang.com/?s=' + title,selector:'div.mainleft div.info'},
{name:'影海', link:'http://www.yinghub.com/search/list.html?keyword=' + title,selector:'div.row div.info'},
{name:'云播网', link:'http://www.yunbowang.cn/index.php?m=vod-search&wd=' + title,selector:'div.container div.col-xs-7'},
{name:'中国高清网', link:'http://gaoqing.la/?s=' + title,selector:'div.mainleft div.thumbnail'},
{name:'最新影视站', link:'http://www.zxysz.com/?s=' + title,selector:'#content li.p-item'},
]
});
site_map.push({
name: "BT国内网站",
label:[
{name:'BT@烧包', link:'http://bt.f-fans.club/search-' + utitle +'.htm',selector:'div.row div.media-body'},
{name:'BT吧', link:'http://www.btba.cc/search?keyword=' + title,selector:'div.left li'},
{name:'BT部落', link:'http://www.btbuluo.com/s/' + title + '.html',selector:'div.b0666ce57 h2.b3224c68'},
{name:'BT蚂蚁', link:'https://www.btmyi.com/search.html?kw=' + title,selector:"div.row h5.item-title"},
{name:'BT下吧', link:'http://www.btxiaba.com/index.php?m=vod-search&wd=' + title,selector:'#content p.pl'},
{name:'BT之家', link:'http://www.btbtt.co/search-index-keyword-' + title + '.htm',selector:'#threadlist table'},
{name:'不太灵', method:"post", link:'http://bt0.com/e/search/',data:`keyboard=${gongwang}&show=title%2Cbtname%2Cimdb%2Cdouban_id%2Cmvtitle&tbname=torrent&tempid=3&orderby=onclick`,headers:{"Content-Type": "application/x-www-form-urlencoded"},rewrite_href:true, selector:"div.row div.col-sm-3"},
{name:'查片源', link:'https://www.chapianyuan.com/?keyword=' + title,selector:'div.block li'},
{name:'磁力猫', link:'http://www.cilimao.me/search?word=' + title,selector:'#Search__content_left___2MajJ div.MovieCard__content___3kv1W'}, // TODO check
{name:'磁力站', link:'http://oabt004.com/index/index?c=&k=' + title,selector:'div.link-list-wrapper ul.link-list'},
{name:'光影资源', link:'http://www.etdown.net/index.php?keyword=' + title,selector:'tbody.list_4 tr'},
{name:'很BT', link:'http://henbt.com/search.php?keyword=' + title,selector:'#listTable span.keyword'},
{name:'我爱P2P', link:'http://www.woaip2p.net/topic/list?categoryId=0&title=' + title,selector:'tbody td.word-break'},
{name:'小浣熊下载', link:`https://www.xiaohx.org/search?key=${title}`,selector:`div.result_p a[title*='${title}']`},
{name:'一站搜', link:'http://v.yizhansou.com/search?kw=' + title,selector:'table td.st'},
{name:'榆木林', link:'http://www.yumuli.com/cili/s/' + title,selector:`h2.search-title a[title*='${title}']`},
]
});
if(has_imdb){
site_map.push({
name: "BT国外网站",
label:[
{name:'1337X', link:'https://1337x.to/search/' + ywm + '/1/',selector:'table.table-list.table.table-responsive.table-striped td.coll-1.name'},
{name:'BT-Scene', link:'https://bt-scene.cc/results_.php?q=' + ywm,selector:'table.tor td.tname'},
{name:'iDope', link:'https://idope.se/torrent-list/' + ywm,selector:'#div2child div.resultdiv'},
{name:'ISOHunt', link:'https://isohunt2.net/torrent/?ihq=' + ywm,selector:'#serps td.title-row'},
{name:'KickAss', link:'https://katcr.co/katsearch/page/1/' + ywm,selector:'div.table--responsive_vertical div.torrents_table__torrent_name'},
{name:'Lime', link:'https://www.limetorrents.cc/search/all/' + ywm,selector:'table.table2 div.tt-name'},
{name:'RARBG', link:'http://rarbg.is/torrents.php?search=' + imdb_id,selector:'table.lista2t tr.lista2'},
{name:'TorLock', link:'https://www.torlock2.com/all/torrents/' + ywm.replace(/ /g,"-") +'.html',selector:'table.table.table-striped.table-bordered.table-hover.table-condensed td.td'},
{name:'WorldWide', link:'https://worldwidetorrents.me/torrents-search.php?search=' + ywm,selector:'div.w3-responsive td.w3-jose'},
{name:'YTS', link:'https://yts.am/browse-movies/' + eng_title,selector:'div.row div.browse-movie-bottom'},
{name:'Zooqle', link:'https://zooqle.com/search?q=' + ywm,selector:'div.panel-body a.small'},
{name:'海盗湾', link:'https://thepiratebay.org/search/' + ywm,selector:'#searchResult div.detName'},
]
});
}
site_map.push({
name: "影视网盘搜索",
label: [
{name: '盘多多影视', link: 'http://www.panduoduo.net/s/comb/n-' + title + '&f-f4',selector: `h3 > a[title*='${title}']`},
{name: '云盘精灵影', link: 'https://www.yunpanjingling.com/search/' + title + '?sort=size.desc',selector: 'div.search-list div.name'},
]
});
} else if (location.host === "book.douban.com") {
let title = $('#wrapper > h1 > span')[0].textContent;
let writer = ' ' + $('#info span.pl:contains("作者")')[0].nextSibling.nextSibling.textContent.replace(/\[[^\]]+\]/g,'').replace(/([^)]+)/g,'').replace(/^\s{1,}/g,'');
let gtitle = encodeToGb2312(title,true);
let ptitle = encodeURI(title).replace(/%/g,"%25");
if (_version === "完整版") {
site_map.push({
name: "图书会员网站",
label:[
{name:"Kindle178", link: "http://www.kindle178.com/search.aspx?book=" + title, selector: "div.search-list div.book"},
{name:"Kindle88", link: "http://www.kindle88.com/?s=" + title + writer, selector: "div.widget-content li.archive-thumb"},
{name:"mLook", link: "http://plugin.mlook.mobi/search?q=" + title, selector: "div.books div.fl.meta"},
{name:"Readfree", link: "http://readfree.me/search/?q=" + title, selector: "#container li.book-item"},
{name:"So-Kindle", link: "https://www.so-kindle.com/q?type=1&keyword=" + title, selector: "div.col-md-12 a.book-tip"},
{name:"Vol.moe", link: "https://vol.moe/list.php?s=" + title.replace(/\d+$/,''), selector: "table.book_list img.img_book"},
{name:"拜读", link: "http://orzbook.com/?s=" + title + writer, selector: "#main li.entry-title"},
{name:"必看网", link: "https://www.biikan.com/home/book/search.shtml?k=" + title, selector: "div.bookList.clearfix a.bookListImg"},
{name:"缤闹",method:"post",link:"http://www.binnao.com/search.php?mod=forum",data:`formhash=49a5e8ec&srchtxt=${title}${writer}&searchsubmit=yes`,headers:{"Content-Type": "application/x-www-form-urlencoded"},rewrite_href:true,selector: "#threadlist li.pbw"},
{name:"点书网",method:"post",link:"http://dianbook.cc/search.php?mod=forum",data:`formhash=1b3e58f6&srchtxt=${title}${writer}&searchsubmit=yes`,headers:{"Content-Type": "application/x-www-form-urlencoded"},rewrite_href:true,selector: "div.tl li.pbw"},
{name:"集思会", link: "http://kindlepush.com/search/?sKey=%22" + title + "%22", selector: "div.m-search.j-area a.title"},
{name:"万千合集站", link: "http://www.hejizhan.com/bbs/?kw=" + title, selector: "ul.tpt-list h2.tpt-tip"},
{name:"我的书屋",method:"post",link:"http://www.wode5.com/e/search/index.php",data:`tbname=book&tempid=1&show=title%2Csoftwriter%2Csoftsay&ecmsfrom=9&keyboard=${title}&submit=`,headers:{"Content-Type": "application/x-www-form-urlencoded"},rewrite_href:true,selector: "div.am-u-sm-9.search-content div.item_info.am-fl",selector_need_login:"div[align='center'] > b:contains('权限')"},
{name:"易读", link: "http://www.yidukindle.com/ebook.php?search=" + title, selector: "div.col-lg-12 strong"},
{name:"走读派", link: "http://www.zoudupai.com/book/share?kw=" + title, selector: "#content p.contentsms"},
]
});
}
site_map.push({
name: "图书在线试读",
label: [
{name: '豆瓣阅读', link: 'https://read.douban.com/search?q=' + title + writer,selector: 'article.col li.item.store-item'},
{name: '多看阅读', link: `http://www.duokan.com/search/${title}${writer}`,selector: `div.wrap > a:contains(${title}) ~ div.u-author > span:contains(${writer.trim()})`},
{name: '京东数字', link: `https://s-e.jd.com/Search?enc=utf-8&key=${title}${writer}`,selector: `div.p-name > a[title='${title}']`},
{name: '亚马逊商店', link: 'https://www.amazon.cn/s/?url=search-alias%3Ddigital-text&field-keywords=' + title + writer,selector: '#centerMinus div.a-fixed-left-grid'},
]
});
site_map.push({
name: "图书免费网站",
label: [
{name: 'Bookset', link: 'https://bookset.me/search/' + title + writer,selector: `h3 > a[title='${title}']`},
{name:"ePUBee", method:"post",type:"json",link:"http://cn.epubee.com/books/?s="+title,ajax:"http://cn.epubee.com/keys/get_ebook_list_search.asmx/getSearchList",data:`{skey:'${title}'}`,headers:{"Content-Type": "application/json; charset=UTF-8"},selector: "d.length > 0"},
{name: 'N资源', method:"post", link:'http://www.nziyuan.com/e/search/index.php',data:`keyboard=${gtitle}&show=title&tempid=1&tbname=download`,headers:{"Content-Type": "application/x-www-form-urlencoded"},rewrite_href:true, selector:'table.box h2.r'},
{name: 'SoBooks', link:'https://sobooks.cc/search/' + title + writer, selector:`h3 > a[title*='${title}']`},
{name: 'XZPC图书',method:"post", link:'http://www.xzpc6.com/#search_'+title,ajax:'http://www.xzpc6.com/sou.php',data:`key=${title}`,headers:{"Content-Type": "application/x-www-form-urlencoded"}, selector:'p a'},
{name: '读书小站', link:'http://ibooks.org.cn/?s=下载 ' + title + writer, selector:'#main h2.entry-title'},
{name: "苦瓜书盘",method:"post",link: "https://kgbook.com/e/search/index.php",data:`keyboard=${title}&show=title%2Cbooksay%2Cbookwriter&tbname=download&tempid=1&submit=%E6%90%9C%E7%B4%A2`,headers:{"Content-Type": "application/x-www-form-urlencoded"},rewrite_href:true,selector: "div.small-12.columns span.text"},
{name: '书语者', link:'https://www.shuyuzhe.com/?s=' + title + writer, selector:`h2.entry-title > a:contains(${title})`},
{name: '我的小书屋', link: 'http://mebook.cc/?s=' + title + writer,selector: '#primary div.content'},
{name:'小浣熊图书', link:`https://www.xiaohx.org/search?cat=9&key=${title}`,selector:`div.result_p a[title*='${title}']`},
{name: '云海图书馆', link: 'http://www.pdfbook.cn/?s=' + title,selector: '#main a.out'},
{name: '周读', link: 'http://www.ireadweek.com/index.php/Index/bookList.html?keyword=' + title,selector: 'ul.hanghang-list a'},
]
});
site_map.push({
name: "图书搜索引擎",
label: [
{name: 'Kindleshare', link: 'https://sk.kindleshare.cn/?submit=Search&name=' + title,selector: '#jieguo a.button'},
{name: '爱问资料', link: `http://ishare.iask.sina.com.cn/search/0-0-all-1-default?cond=${ptitle}`,selector: `p.text.cf > a.fl.fl-title[title*='${title}']`},
{name: '盘多多图书', link: 'http://www.panduoduo.net/s/comb/n-' + title + '&f-f2',selector: `h3 > a[title*='${title}']`},
{name: '盘搜搜微盘', link: 'http://www.pansoso.com/vdisk/' + title,selector: `a > em:contains(${title})`},
{name: '书语者搜书', link: 'https://book.shuyuzhe.com/search/' + title,selector: 'table.table.table-hover b'},
{name: '云盘精灵书', link: 'https://www.yunpanjingling.com/search/' + title + '?filter_mode=ebook',selector: 'div.search-list div.name'},
]
});
site_map.push({
name: "图书有声网站",
label: [
{name:'小浣熊有声', link:`https://www.xiaohx.org/search?cat=5&key=${title}`,selector:`div.result_p a[title*='${title}']`},
]
});
} else if (location.host === "music.douban.com") {
let title = $('#wrapper > h1 > span')[0].textContent.split(' ').shift().replace(/[,]/g," ").replace(/:.*$/,"");
let singer = ' ' + $('#info > span > span.pl > a')[0].textContent;
if (_version === "完整版") {
site_map.push({
name: "PT音乐顶配",
label:[
{name: "CHDBits♬", link: 'https://chdbits.co/torrents.php?cat406=1&cat408=1&incldead=1&search_area=1¬newword=1&search=' + title + singer,},
{name:"CMCT♬", link: "https://hdcmct.org/torrents.php?cat508=1&incldead=1&search_area=1¬newword=1&search=" + title + singer,},
{name: "HDChina♬", link: 'https://hdchina.org/torrents.php?cat408=1&incldead=1&search_area=1¬newword=1&search=' + title + singer,selector: "table.torrent_list:last > tbody > tr:gt(0)"},
{name: "HDSky♬", link: 'https://hdsky.me/torrents.php?cat408=1&incldead=1&search_area=1¬newword=1&search=' + title + singer,},
{name: "MTeam♬", link: 'https://tp.m-team.cc/torrents.php?cat408=1&cat434=1&incldead=1&search_area=1¬newword=1&search=' + title + singer,},
{name: "OpenCD♬", link: 'https://open.cd/torrents.php?incldead=1&search_area=0¬newword=1&search=' + title + singer, selector: "table.torrents:last > tbody > tr:gt(0)"},
{name: "OurBits♬", link: 'https://ourbits.club/torrents.php?cat=416&incldead=1&search_area=1¬newword=1&search=' + title + singer,},
{name: "TTG♬", link: 'https://totheglory.im/browse.php?c=M¬newword=1&search_field=分类%3A%60无损音乐FLAC%26APE%60+分类%3A%60%28电影原声%26Game%29OST%60 ' + title + singer, selector: "table#torrent_table:last > tbody > tr:gt(0)"},
{name: "U2♬", link: 'https://u2.dmhy.org/torrents.php?cat30=1&incldead=1&search_area=0¬newword=1&search=' + title.split(' ')[0],},
]
});
site_map.push({
name: "PT音乐标配",
label:[
{name: "HDCity♬", link: 'https://hdcity.city/pt?cat408=1&incldead=1&search_area=1¬newword=1&iwannaseethis=' + title + singer, selector: "center > div > div > div.text"},
{name: "HDHome♬", link: 'https://hdhome.org/torrents.php?cat439=1&cat440=1&incldead=1&search_area=1¬newword=1&search=' + title + singer,},
{name: "HDTime♬", link: 'https://hdtime.org/torrents.php?cat=408&incldead=1&search_area=1¬newword=1&search=' + title + singer,},
{name: "Hyperay♬", link: 'https://hyperay.org/torrents.php?cat411=1&incldead=1&search_area=1¬newword=1&search=' + title + singer, selector: "table.torrents > tbody > tr.nonstick_outer_bg"},
{name: "JoyHD♬", link: 'https://www.joyhd.net/torrents.php?cat=414&incldead=1&search_area=1¬newword=1&search=' + title + singer,},
{name: "PlayPT♬", link: 'http://pt.playpt123.org/play.php?cat408=1&search_area=1¬newword=1&search=' + title + singer,},
]
});
site_map.push({
name: "PT音乐教育",
label:[
{name: "BYRBT♬", link: 'https://bt.byr.cn/torrents.php?cat=402&incldead=1&search_area=1¬newword=1&search=' + title + singer,},
{name: "NPUBITS♬", link: 'https://npupt.com/torrents.php?cat=414&incldead=1&search_area=1¬newword=1&search=' + title + singer, selector: "#torrents_table > tbody > tr:gt(0)"},
{name: "NYPT♬", link: 'https://nanyangpt.com/torrents.php?cat407=1&incldead=1&search_area=1¬newword=1&search=' + title + singer, selector: "table.torrents:last > tbody > tr"},
{name: "SJTU♬", link: 'https://pt.sjtu.edu.cn/torrents.php?cat420=1&cat421=1&cat422=1&cat423=1&cat425=1&cat426=1&incldead=1&search_area=1¬newword=1&search=' + title + singer, selector: "table.torrents:last > tbody > tr"},
{name: "WHUPT♬", link: 'https://pt.whu.edu.cn/torrents.php?cat8=1&incldead=1&search_area=1¬newword=1&search=' + title + singer, selector: "table.torrents:last > tbody > tr"},
{name: "ZX♬", link: 'http://pt.zhixing.bjtu.edu.cn/search/music/x' + title + singer + '-notnewword=1/', selector: "table.torrenttable > tbody > tr:gt(1)"},
]
});
site_map.push({
name: "音乐论坛资源",
label:[
{name: "捌零音乐", link: 'http://zhannei.baidu.com/cse/search?s=7126057724754327244&entry=1&q=' + title + singer,selector: "#results h3.c-title"},
{name: "乐赏音乐", link: 'https://www.gscq.me/search.htm?keyword=' + title,selector:`div.subject.break-all a:contains(${singer})`},
{name: "炫音音乐", link: `http://so.musicool.cn/cse/search?s=10523158750213826925&q=${title}${singer}`,selector: "#results h3.c-title"},
]
});
}
site_map.push({
name: "在线音乐播放",
label: [
{name: 'QQ音乐', link: 'https://y.qq.com/portal/search.html#page=1&searchid=1&remoteplace=txt.yqq.top&t=album&w=' + title + singer,ajax:"https://c.y.qq.com/soso/fcgi-bin/client_search_cp?t=8&format=json&w=" + title +singer,type:"json",selector: 'data.album.totalnum > 0'},
{name: '百度音乐', link: 'http://music.baidu.com/search/album?key=' + title + singer,selector: '#album_list div.album-info'},
{name: '酷我音乐', link: 'http://sou.kuwo.cn/ws/NSearch?type=album&key=' + title + singer,selector: 'div.album p.musicName'},
{name: '咪咕音乐', link: `http://music.migu.cn/v2/search?type=album&keyword=${title}${singer}`,selector: `div.album-name font:contains(${title})`},
{name: '虾米音乐', link: `https://www.xiami.com/search/album/?key=${title}${singer}`,selector: `p.name > a[title='${title}'] + a[title='${singer.trim()}']`},
{name: '网易云音乐', link: 'https://music.163.com/#/search/m/?type=10&s=' + title + singer,ajax:"https://api.imjad.cn/cloudmusic/?type=search&s=" + title + singer,type:"json",selector: 'result.songCount > 0'},
]
});
site_map.push({
name: "音乐免费网站",
label: [
{name: 'XiCXi',method:"post", link:'http://www.xicxi.com/search.php?mod=forum',data:`srchtxt=${title}${singer}&searchsubmit=yes`,headers:{"Content-Type": "application/x-www-form-urlencoded"},rewrite_href:true, selector:'#ct li.pbw'},
{name: 'XZPC音乐',method:"post", link:'http://www.xzpc6.com/#search_'+title,ajax:'http://www.xzpc6.com/sou.php',data:`key=${title}`,headers:{"Content-Type": "application/x-www-form-urlencoded"}, selector:'p a'},
{name: '爱无损', link: 'http://www.lovewusun.com/?s=' + title + singer,selector: '#main h2.entry-title'},
{name:'小浣熊音乐', link:`https://www.xiaohx.org/search?cat=5&key=${title}${singer}`,selector:`div.result_p a[title*='${title}']`},
]
});
site_map.push({
name: "音乐国内网盘",
label: [
{name:'磁力猫音乐', link:'http://www.cilimao.me/search?sortProperties=content_size&resourceType=6&word=' + title + singer,selector:'#Search__container___UVm4k a.Search__result_title___24kb_'},
{name: '盘多多音乐', link: 'http://www.panduoduo.net/s/comb/n-' + title + singer + '&f-f13',selector: `h3 > a[title*='${singer.trim()}']`},
{name: '云盘精灵音', link: 'https://www.yunpanjingling.com/search/' + title + singer + '?sort=size.desc',selector: 'div.search-list div.name'},
]
});
site_map.push({
name: "音乐国外网盘",
label: [
{name: 'AvaxHome♬', link: 'https://soek.pw/search/?category_slug=music&query=' + title + singer,selector: 'div.col-xs-12.col-sm-8.col-md-8.col-lg-8 div.panel-heading'},
{name: 'LessBuzz', link: 'http://lessbuzz.com/?s=' + title + singer,selector: 'div.row h2.post-title'},
]
});
}
function Exist_check(label) {
let site = label.name;
let psite = $(`a[data-name="${site}"]`);
function TagExist(link){
$(psite).css("background-color", GM_getValue("tag_bcolor_exist","#e3f1ed"));
$(psite).css("color", GM_getValue("tag_fcolor_exist","#3377aa"));
$(psite).attr("title","资源存在");
let storage_data = true;
if (label.rewrite_href && label.rewrite_href === true) { // 重写链接
storage_data = GM_getCacheValue(`${douban_id}_${site}`, link || $(psite).attr("href"),false);
$(psite).attr("href",storage_data);
}
GM_setCacheValue(`${douban_id}_${site}`,storage_data,86400 * 7 * 1e3,false);
}
function TagNotExist() {
$(psite).css("background-color", GM_getValue("tag_bcolor_not_exist","#f4eac2"));
$(psite).css("color", GM_getValue("tag_fcolor_not_exist","#3377aa"));
$(psite).attr("title","资源不存在");
}
function TagNeedLogin() {
$(psite).css("background-color", GM_getValue("tag_bcolor_need_login",""));
$(psite).css("color", GM_getValue("tag_fcolor_need_login","#3377aa"));
GM_setCacheValue(`need_login_${site}`,true, 86400 * 1e3);
$(psite).click(function () {
GM_deletedCacheValue(`need_login_${site}`);
});
$(psite).attr("title","站点需要登陆");
}
function TagError() {
$(psite).css("background-color", GM_getValue("tag_bcolor_error",""));
$(psite).css("color", GM_getValue("tag_fcolor_error","#3377aa"));
$(psite).attr("title", "遇到问题");
}
// 这里假定有这个资源的就一直都有,直接使用第一次请求成功的时候缓存信息
if (GM_getCacheValue(`${douban_id}_${site}`, false)) {
TagExist();
return;
}
// 如果前次检查到这个站点需要登陆
if (GM_getCacheValue(`need_login_${site}`, false)) {
TagNeedLogin();
return;
}
// 不然,则请求相关信息
$(psite).attr("title", "正在请求信息中");
GM_xmlhttpRequest({
method: label.method || "GET",
url: label.ajax || label.link,
data: label.data,
headers: label.headers,
onload: function (res) {
if (/login|verify|checkpoint|returnto/ig.test(res.finalUrl)) {
TagNeedLogin(); // 检查最终的URL看是不是需要登陆
} else if (/refresh: \d+; url=.+login.+/ig.test(res.responseHeaders)){
TagNeedLogin(); // 检查responseHeader有没有重定向
} else {
let responseText = res.responseText;
// if (label.name==="AT") {console.log(label.name);console.log(res.finalUrl);console.log(res.responseHeaders);console.log(res.responseText);}
if (typeof responseText === "undefined") {
TagNeedLogin(); // 检查最终的Text,如果什么都没有也可能说明需要登陆
} else if (responseText.length <800 && /login/.test(responseText)) {
TagNeedLogin(); // 对Text进行检查,断言“过短,且中间出现login字段”即说明可能需要登陆
} else { // 开始解析返回信息
try {
TagNotExist(); // 先断言不存在
if (label.type && ["json","jsonp"].includes(label.type)){ // 如果前面定义了返回类型是"json'或者"jsonp"
if (label.type === "jsonp") {
responseText = responseText.match(/[^(]+\((.+)\)/)[1];
}
let par = JSON.parse(responseText);
if (eval("par." + label.selector)) {
TagExist();
}
} else { // 否则默认label.type的默认值为 html
let doc = (new DOMParser()).parseFromString(res.responseText, 'text/html');
let body = doc.querySelector("body");
// 因为jQuery的选择器丰富,故这里不用 dom.querySelector() 而用 jQuery.find()
if (label.selector_need_login && $(body).find(label.selector_need_login).length){
TagNeedLogin(); // 如果存在selector_need_login选择器,则先判断是否存在以确定是否需要登录
} else if ($(body).find(label.selector || "table.torrents:last > tbody > tr:gt(0)").length) {
TagExist(res.finalUrl); // 最后使用selector选择器判断资源是否存在
}
}
} catch (e) {
TagError();
}
}
}
},
onerror: function () {
TagError();
}
});
}
$("#content div.aside").prepend("");
function site_exist_status() {
for (let i = 0; i < site_map.length; i++) {
let map_dic = site_map[i];
if (GM_getValue(delete_site_prefix + map_dic.name,false)) {
continue;
}
$('#adv-sites').append(`${map_dic.name}· · · · · ·
`);
let in_site_html = $(`div[data-id='${i}'] ul.bs`);
for (let j = 0; j < map_dic.label.length; j++) {
let label = map_dic.label[j];
if (GM_getValue(delete_site_prefix + label.name,false)) {
continue;
}
in_site_html.append(`${label.name}`);
Exist_check(label);
}
}
}
site_exist_status();
});