X/js/荐片.json
2023-08-13 11:37:30 +08:00

37 lines
No EOL
13 KiB
JSON

var rule = {
title:'drpy',
host:'https://frodo.douban.com',
apidoc:'https://www.doubanapi.com',
homeUrl:'',
searchUrl:'',
searchable:1,
quickSearch:1,
filterable:1,
// 分类链接fypage参数支持1个()表达式
url:'/?pg=fypage&class=fyclass&douban=$douban',
filter_url:'fl={{fl}}',
:'@Referer=https://api.douban.com/@User-Agent=Mozilla/5.0%20(Windows%20NT%2010.0;%20Win64;%20x64)%20AppleWebKit/537.36%20(KHTML,%20like%20Gecko)%20Chrome/113.0.0.0%20Safari/537.36',
headers:{
"Host": "frodo.douban.com",
// "Host": "api.douban.com",
"Connection": "Keep-Alive",
"Referer": "https://servicewechat.com/wx2f9b06c1de1ccfca/84/page-frame.html",
// "content-type": "application/json",
"User-Agent": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36 MicroMessenger/7.0.9.501 NetType/WIFI MiniProgramEnv/Windows WindowsWechat"
},
timeout:5000,
class_name:'&&&&&&',
class_url:'hot_gaia&tv_hot&show_hot&movie&tv&rank_list_movie&rank_list_tv',
filter:{'interests': [{'key': 'status', 'name': '', 'value': [{'n': '', 'v': 'mark'}, {'n': '', 'v': 'doing'}, {'n': '', 'v': 'done'}]}, {'key': 'subtype_tag', 'name': '', 'value': [{'n': '', 'v': ''}, {'n': '', 'v': 'movie'}, {'n': '', 'v': 'tv'}]}, {'key': 'year_tag', 'name': '', 'value': [{'n': '', 'v': ''}, {'n': '2023', 'v': '2023'}, {'n': '2022', 'v': '2022'}, {'n': '2021', 'v': '2021'}, {'n': '2020', 'v': '2020'}, {'n': '2019', 'v': '2019'}, {'n': '2010', 'v': '2010'}, {'n': '2000', 'v': '2000'}, {'n': '90', 'v': '90'}, {'n': '80', 'v': '80'}, {'n': '70', 'v': '70'}, {'n': '60', 'v': '60'}, {'n': '', 'v': ''}]}], 'hot_gaia': [{'key': 'sort', 'name': '', 'value': [{'n': '', 'v': 'recommend'}, {'n': '', 'v': 'time'}, {'n': '', 'v': 'rank'}]}, {'key': 'area', 'name': '', 'value': [{'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}]}], 'tv_hot': [{'key': 'type', 'name': '', 'value': [{'n': '', 'v': 'tv_hot'}, {'n': '', 'v': 'tv_domestic'}, {'n': '', 'v': 'tv_american'}, {'n': '', 'v': 'tv_japanese'}, {'n': '', 'v': 'tv_korean'}, {'n': '', 'v': 'tv_animation'}]}], 'show_hot': [{'key': 'type', 'name': '', 'value': [{'n': '', 'v': 'show_hot'}, {'n': '', 'v': 'show_domestic'}, {'n': '', 'v': 'show_foreign'}]}], 'movie': [{'key': '', 'name': '', 'value': [{'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '西', 'v': '西'}, {'n': '', 'v': ''}, {'n': '', 'v': ''}]}, {'key': '', 'name': '', 'value': [{'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '西', 'v': '西'}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '西', 'v': '西'}, {'n': '', 'v': ''}]}, {'key': 'sort', 'name': '', 'value': [{'n': '', 'v': 'T'}, {'n': '', 'v': 'R'}, {'n': '', 'v': 'S'}]}, {'key': '', 'name': '', 'value': [{'n': '', 'v': ''}, {'n': '2023', 'v': '2023'}, {'n': '2022', 'v': '2022'}, {'n': '2021', 'v': '2021'}, {'n': '2020', 'v': '2020'}, {'n': '2019', 'v': '2019'}, {'n': '2010', 'v': '2010'}, {'n': '2000', 'v': '2000'}, {'n': '90', 'v': '90'}, {'n': '80', 'v': '80'}, {'n': '70', 'v': '70'}, {'n': '60', 'v': '60'}, {'n': '', 'v': ''}]}], 'tv': [{'key': '', 'name': '', 'value': [{'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}]}, {'key': '', 'name': '', 'value': [{'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}]}, {'key': '', 'name': '', 'value': [{'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}]}, {'key': '', 'name': '', 'value': [{'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '西', 'v': '西'}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '西', 'v': '西'}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}]}, {'key': 'sort', 'name': '', 'value': [{'n': '', 'v': 'T'}, {'n': '', 'v': 'R'}, {'n': '', 'v': 'S'}]}, {'key': '', 'name': '', 'value': [{'n': '', 'v': ''}, {'n': '2023', 'v': '2023'}, {'n': '2022', 'v': '2022'}, {'n': '2021', 'v': '2021'}, {'n': '2020', 'v': '2020'}, {'n': '2019', 'v': '2019'}, {'n': '2010', 'v': '2010'}, {'n': '2000', 'v': '2000'}, {'n': '90', 'v': '90'}, {'n': '80', 'v': '80'}, {'n': '70', 'v': '70'}, {'n': '60', 'v': '60'}, {'n': '', 'v': ''}]}, {'key': '', 'name': '', 'value': [{'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': '', 'v': ''}, {'n': 'Netflix', 'v': 'Netflix'}, {'n': 'HBO', 'v': 'HBO'}, {'n': 'BBC', 'v': 'BBC'}, {'n': 'NHK', 'v': 'NHK'}, {'n': 'CBS', 'v': 'CBS'}, {'n': 'NBC', 'v': 'NBC'}, {'n': 'tvN', 'v': 'tvN'}]}], 'rank_list_movie': [{'key': '', 'name': '', 'value': [{'n': '', 'v': 'movie_real_time_hotest'}, {'n': '', 'v': 'movie_weekly_best'}, {'n': 'Top250', 'v': 'movie_top250'}]}], 'rank_list_tv': [{'key': '', 'name': '', 'value': [{'n': '', 'v': 'tv_real_time_hotest'}, {'n': '', 'v': 'tv_chinese_best_weekly'}, {'n': '', 'v': 'tv_global_best_weekly'}, {'n': '', 'v': 'show_chinese_best_weekly'}, {'n': '', 'v': 'show_global_best_weekly'}]}]},
limit:20,
play_parse:false,
:'',
:'js:let d=[];let douban_api_host="http://api.douban.com/api/v2";let miniapp_apikey="0ac44ae016490db2204ce0a042db2916";const count=30;function miniapp_request(path,query){try{let url=douban_api_host+path;query.apikey=miniapp_apikey;fetch_params.headers=oheaders;url=buildUrl(url,query);let html=fetch(url,fetch_params);return JSON.parse(html)}catch(e){print("发生了错误:"+e.message);return{}}}function subject_real_time_hotest(){try{let res=miniapp_request("/subject_collection/subject_real_time_hotest/items",{});let lists=[];let arr=res.subject_collection_items||[];arr.forEach(function(item){if(item.type==="movie"||item.type==="tv"){let rating=item.rating?item.rating.value:"暂无评分";let honnor=(item.honor_infos||[]).map(function(it){return it.title}).join("|");lists.append({vod_id:"msearch:"+TYPE,vod_name:item.title||"",vod_pic:item.pic.normal,vod_remarks:rating+" "+honnor})}});return lists}catch(e){print("发生了错误:"+e.message);return[]}}VODS=subject_real_time_hotest();print(VODS);',
// 手动调用解析请求json的url,此lazy不方便
lazy:'',
// 推荐:'.list_item;img&&alt;img&&src;a&&Text;a&&data-float',
:'',
:'js:let d=[];let douban=input.split("douban=")[1].split("&")[0];let douban_api_host="http://api.douban.com/api/v2";let miniapp_apikey="0ac44ae016490db2204ce0a042db2916";const count=30;function miniapp_request(path,query){try{let url=douban_api_host+path;query.apikey=miniapp_apikey;fetch_params.headers=oheaders;url=buildUrl(url,query);let html=fetch(url,fetch_params);if(/request_error/.test(html)){print(html)}return JSON.parse(html)}catch(e){print("发生了错误:"+e.message);return{}}}function cate_filter(d,douban){douban=douban||"";try{let res={};if(MY_CATE==="interests"){if(douban){let status=MY_FL.status||"mark";let subtype_tag=MY_FL.subtype_tag||"";let year_tag=MY_FL.year_tag||"全部";let path="/user/"+douban+"/interests";res=miniapp_request(path,{type:"movie",status:status,subtype_tag:subtype_tag,year_tag:year_tag,start:(MY_PAGE-1)*count,count:count})}else{return{}}}else if(MY_CATE==="hot_gaia"){let sort=MY_FL.sort||"recommend";let area=MY_FL.area||"全部";let path="/movie/"+MY_CATE;res=miniapp_request(path,{area:area,sort:sort,start:(MY_PAGE-1)*count,count:count})}else if(MY_CATE==="tv_hot"||MY_CATE==="show_hot"){let stype=MY_FL.type||MY_CATE;let path="/subject_collection/"+stype+"/items";res=miniapp_request(path,{start:(MY_PAGE-1)*count,count:count})}else if(MY_CATE.startsWith("rank_list")){let id=MY_CATE==="rank_list_movie"?"movie_real_time_hotest":"tv_real_time_hotest";id=MY_FL.||id;let path="/subject_collection/"+id+"/items";res=miniapp_request(path,{start:(MY_PAGE-1)*count,count:count})}else{let path="/"+MY_CATE+"/recommend";let selected_categories;let tags;let sort;if(Object.keys(MY_FL).length>0){sort=MY_FL.sort||"T";tags=Object.values(MY_FL).join(",");if(MY_CATE==="movie"){selected_categories={"类型":MY_FL.||"","地区":MY_FL.||""}}else{selected_categories={"类型":MY_FL.||"","形式":MY_FL.?MY_FL.+"地区":"","地区":MY_FL.||""}}}else{sort="T";tags="";if(MY_CATE==="movie"){selected_categories={"类型":"","地区":""}}else{selected_categories={"类型":"","形式":"","地区":""}}}let params={tags:tags,sort:sort,refresh:0,selected_categories:stringify(selected_categories),start:(MY_PAGE-1)*count,count:count};res=miniapp_request(path,params)}let result={page:MY_PAGE,pagecount:Math.ceil(res.total/count),limit:count,total:res.total};let items=[];if(/^rank_list|tv_hot|show_hot/.test(MY_CATE)){items=res["subject_collection_items"]}else if(MY_CATE==="interests"){res["interests"].forEach(function(it){items.push(it.subject)})}else{items=res.items}let lists=[];items.forEach(function(item){if(item.type==="movie"||item.type==="tv"){let rating=item.rating?item.rating.value:"";let rat_str=rating||"暂无评分";let title=item.title;let honor=item.honor_infos||[];let honor_str=honor.map(function(it){return it.title}).join("|");let vod_obj={vod_name:title!=="未知电影"?title:"暂不支持展示",vod_pic:item.pic.normal,vod_remarks:rat_str+" "+honor_str};let vod_obj_d={url:item.type+"$"+item.id,title:title!=="未知电影"?title:"暂不支持展示",pic_url:item.pic.normal,desc:rat_str+" "+honor_str};lists.push(vod_obj);d.push(vod_obj_d)}});result.list=lists;return result}catch(e){print(e.message)}return{}}let res=cate_filter(d,douban);setResult2(res);',
:'',
:'',
}