├── 115lx.js ├── 115tonplayer.js └── netflixratings.js /115lx.js: -------------------------------------------------------------------------------- 1 | /* 2 | 使用方法: 3 | 注意:该脚本无破解离线功能,只是给新版115的App添加创建离线任务的方法。 4 | 1.在[Script]分组下添加下面这行配置 5 | http-response ^http:\/\/115\.com\/lx.*$ script-path=https://raw.githubusercontent.com/ikanam/Surge-Scripts/master/115lx.js, requires-body=true 6 | http-response ^https?:\/\/webapi\.115\.com\/user\/check_sign.*$ script-path=https://raw.githubusercontent.com/ikanam/Surge-Scripts/master/115lx.js, requires-body=true 7 | 2.[MITM]分组添加hostname = *.115.com 8 | 3.在115Aapp中通过网页打开http://115.com/lx?taskdg=1(可在记录中保存该地址打开, 也可添加下面的配置将首页的签到按钮跳转重定向到离线下载页面) 9 | [URL Rewrite] 10 | ^http:\/\/115\.com\/\?ct=sign$ http://115.com/lx?taskdg=1 header 11 | 4.快速创建下载任务的快捷指令: https://www.icloud.com/shortcuts/31e3a877cec340a48192aa081e25c05e 12 | */ 13 | 14 | var body = $response.body; 15 | if ($request.url.indexOf('/user/check_sign') != -1) { 16 | let json = JSON.parse(body); 17 | json.data.is_new_sign = false; 18 | body = JSON.stringify(json); 19 | } else { 20 | body = body.replace("UDown", 'XXXXXXXXX'); // 使重定向判断条件失效 21 | let clearJS = `` 45 | body = body.replace("", clearJS + '\n'); // 注入清空任务相关JS 46 | } 47 | $done({body}); 48 | -------------------------------------------------------------------------------- /115tonplayer.js: -------------------------------------------------------------------------------- 1 | /* 2 | 提取115中的视频使用nPlayer进行播放. 3 | 使用方法: 4 | 1.在[Script]分组下添加下面这行配置 5 | http-request ^https?:\/\/.*\.115\.com\/.*\.m3u8.*$ script-path=https://raw.githubusercontent.com/ikanam/Surge-Scripts/master/115tonplayer.js 6 | */ 7 | $notification.post('播放地址提取成功, 长按(重按)通知查看', '', 'nplayer-' + $request.url); 8 | $done({}); -------------------------------------------------------------------------------- /netflixratings.js: -------------------------------------------------------------------------------- 1 | /* 2 | 使用方法: 3 | 1.[Script]分组下添加下面两行配置 4 | http-request https:\/\/ios\.prod\.ftl\.netflix\.com\/iosui\/user\/.*path=%5B%22videos%22%2C%[0-9]+%22%2C%22summary%22%5D&pathFormat.* script-path=https://raw.githubusercontent.com/ikanam/Surge-Scripts/master/netflixratings.js 5 | http-response https:\/\/ios\.prod\.ftl\.netflix\.com\/iosui\/user\/.*path=%5B%22videos%22%2C%[0-9]+%22%2C%22summary%22%5D&pathFormat.* requires-body=1, script-path=https://raw.githubusercontent.com/ikanam/Surge-Scripts/master/netflixratings.js 6 | 2.[MITM]分组添加hostname = ios.prod.ftl.netflix.com 7 | 3.IMDb分数将显示在详情页的封面下方。 8 | 4.因为获取分数的API对中文标题支持不好,所以修改了request,针对该接口返回英文信息,所以可能界面部分信息会变成英文。 9 | 5.API每日有1000次请求限制,如果超出限制请自己申请APIKey替换.(http://www.omdbapi.com/apikey.aspx) 10 | */ 11 | if ($request.headers != undefined) { 12 | var url = $request.url; 13 | url = url.replace(/&languages=zh-.{2,4}&/g, "&languages=en-US&") 14 | $done({url}); 15 | } else { 16 | var body = $response.body; 17 | let bodyObject = JSON.parse(body); 18 | let movieID = bodyObject.paths[0][1]; 19 | let title = bodyObject.value.videos[movieID].summary.title; 20 | let requestURL = `http://www.omdbapi.com/?t=${encodeURIComponent(title)}&apikey=132e834f`; 21 | $httpClient.get(requestURL, function(error, response, data) { 22 | if (error){ 23 | $done({}); 24 | } else { 25 | var obj = JSON.parse(data); 26 | if (obj.Error) { 27 | $done({}); 28 | } else { 29 | let supplementalMessage = bodyObject.value.videos[movieID].summary.supplementalMessage; 30 | if (supplementalMessage != undefined) { 31 | bodyObject.value.videos[movieID].summary.supplementalMessage = `IMDb Rating: ${obj.imdbRating} IMDb Votes: ${obj.imdbVotes}\n` + supplementalMessage; 32 | } else { 33 | bodyObject.value.videos[movieID].summary.supplementalMessage = `IMDb Rating: ${obj.imdbRating} IMDb Votes: ${obj.imdbVotes}`; 34 | } 35 | body = JSON.stringify(bodyObject); 36 | $done({body}); 37 | } 38 | } 39 | }); 40 | } 41 | --------------------------------------------------------------------------------