X/js/drpy.js
2023-07-28 11:17:55 +08:00

37 lines
14 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

var rule = {
title:'drpy',
host:'https://frodo.douban.com',
apidoc:'https://www.doubanapi.com',
homeUrl:'',
searchUrl:'',
searchable:1,
quickSearch:1,
filterable:1,
// 鍒嗙被閾炬帴fypage鍙傛暟鏀寔1涓<31>()琛ㄨ揪寮<E68FAA>
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:'鐑棬鐢靛奖&鐑挱鍓ч泦&鐑挱缁艰壓&鐢靛奖绛涢€<E6B6A2>&鐢佃绛涢€<E6B6A2>&鐢靛奖姒滃崟&鐢佃姒滃崟',
class_url:'hot_gaia&tv_hot&show_hot&movie&tv&rank_list_movie&rank_list_tv',
filter:{'interests': [{'key': 'status', 'name': '鐘舵€<E888B5>', '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': '鏈€鏂<E282AC>', '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': '鍥戒骇鍓<E9AA87>', 'v': 'tv_domestic'}, {'n': '娆х編鍓<E7B7A8>', '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': '鎭愭€<E684AD>', 'v': '鎭愭€<E684AD>'}, {'n': '鎴樹簤', 'v': '鎴樹簤'}, {'n': '浼犺', 'v': '浼犺'}, {'n': '姝岃垶', 'v': '姝岃垶'}, {'n': '姝︿緺', 'v': '姝︿緺'}, {'n': '鎯呰壊', 'v': '鎯呰壊'}, {'n': '鐏鹃毦', 'v': '鐏鹃毦'}, {'n': '瑗块儴', 'v': '瑗块儴'}, {'n': '绾綍鐗<E7B68D>', 'v': '绾綍鐗<E7B68D>'}, {'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': '鎰忓ぇ鍒<E38187>', 'v': '鎰忓ぇ鍒<E38187>'}, {'n': '瑗跨彮鐗<E5BDAE>', 'v': '瑗跨彮鐗<E5BDAE>'}, {'n': '鍗板害', 'v': '鍗板害'}, {'n': '娉板浗', 'v': '娉板浗'}, {'n': '淇勭綏鏂<E7B68F>', 'v': '淇勭綏鏂<E7B68F>'}, {'n': '鍔犳嬁澶<E5AC81>', 'v': '鍔犳嬁澶<E5AC81>'}, {'n': '婢冲ぇ鍒╀簹', 'v': '婢冲ぇ鍒╀簹'}, {'n': '鐖卞皵鍏<E79AB5>', 'v': '鐖卞皵鍏<E79AB5>'}, {'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': '鐢佃鍓<EE9D8B>', 'v': '鐢佃鍓<EE9D8B>'}, {'n': '缁艰壓', 'v': '缁艰壓'}]}, {'key': '鐢佃鍓у舰寮<E888B0>', 'name': '鐢佃鍓у舰寮<E888B0>', 'value': [{'n': '涓嶉檺', 'v': ''}, {'n': '鍠滃墽', 'v': '鍠滃墽'}, {'n': '鐖辨儏', 'v': '鐖辨儏'}, {'n': '鎮枒', 'v': '鎮枒'}, {'n': '鍔ㄧ敾', 'v': '鍔ㄧ敾'}, {'n': '姝︿緺', 'v': '姝︿緺'}, {'n': '鍙よ', 'v': '鍙よ'}, {'n': '瀹跺涵', 'v': '瀹跺涵'}, {'n': '鐘姜', 'v': '鐘姜'}, {'n': '绉戝够', 'v': '绉戝够'}, {'n': '鎭愭€<E684AD>', 'v': '鎭愭€<E684AD>'}, {'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': '鎰忓ぇ鍒<E38187>', 'v': '鎰忓ぇ鍒<E38187>'}, {'n': '娉曞浗', 'v': '娉曞浗'}, {'n': '寰峰浗', 'v': '寰峰浗'}, {'n': '瑗跨彮鐗<E5BDAE>', 'v': '瑗跨彮鐗<E5BDAE>'}, {'n': '淇勭綏鏂<E7B68F>', 'v': '淇勭綏鏂<E7B68F>'}, {'n': '鐟炲吀', 'v': '鐟炲吀'}, {'n': '宸磋タ', 'v': '宸磋タ'}, {'n': '涓归害', 'v': '涓归害'}, {'n': '鍗板害', 'v': '鍗板害'}, {'n': '鍔犳嬁澶<E5AC81>', 'v': '鍔犳嬁澶<E5AC81>'}, {'n': '鐖卞皵鍏<E79AB5>', 'v': '鐖卞皵鍏<E79AB5>'}, {'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': '鐖卞鑹<EE9A8C>', 'v': '鐖卞鑹<EE9A8C>'}, {'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': '鍗庤鍙鍓ч泦姒<E6B3A6>', 'v': 'tv_chinese_best_weekly'}, {'n': '鍏ㄧ悆鍙鍓ч泦姒<E6B3A6>', 'v': 'tv_global_best_weekly'}, {'n': '鍥藉唴鍙缁艰壓姒<E5A393>', 'v': 'show_chinese_best_weekly'}, {'n': '鍥藉鍙缁艰壓姒<E5A393>', '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("鍙戠敓浜嗛敊璇<E6958A>:"+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("鍙戠敓浜嗛敊璇<E6958A>:"+e.message);return[]}}VODS=subject_real_time_hotest();print(VODS);',
// 鎵嬪姩璋冪敤瑙瀽璇锋眰json鐨剈rl,姝azy涓嶆柟渚<E69F9F>
lazy:'',
// 鎺ㄨ崘:'.list_item;img&&alt;img&&src;a&&Text;a&&data-float',
<EFBFBD>:'',
<EFBFBD>:'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("鍙戠敓浜嗛敊璇<E6958A>:"+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);',
浜岀骇:'',
鎼滅储:'',
}