This commit is contained in:
Shawn
2019-06-26 17:13:01 +08:00
parent 9880e91890
commit f28366f402
7 changed files with 40 additions and 1 deletions

45
Scripts/Aweme.js Normal file
View File

@@ -0,0 +1,45 @@
$notify(TikTok, 已匹配)
let result = $response.body;
function replaceAll(str, find, replace) {
return str.replace(new RegExp(find, 'g'), replace);
}
var keyword = ['watermark=1'];
keyword.forEach(function(k) {
result = replaceAll(result, k, 'watermark=0');
});
body = JSON.parse(result);
if(result.indexOf('aweme_list') != -1){
body.aweme_list.forEach((element, index)=>{
if(element.hasOwnProperty('raw_ad_data')){
body.aweme_list.splice(index, 1);
}
});
body.aweme_list.forEach((element, index)=>{
if(element.hasOwnProperty('simple_promotions')){
delete body.aweme_list[index].simple_promotions;
}
});
body.aweme_list.forEach((element, index) => {
if (element.interaction_stickers !== null) {
body.aweme_list[index].interaction_stickers = null;
}
});
body['aweme_list'].forEach((element, index) => {
if (element.prevent_download === true) {
body['aweme_list'][index].status.reviewed = 1;
body['aweme_list'][index].prevent_download = false;
}
});
}
body = JSON.stringify(body);
$done(body);
/**********************************************************
From Surge Version: https://raw.githubusercontent.com/Choler/Surge/master/Script/Aweme.js
[Rewrite]
^https:\/\/[\s\S]*\/v1\/(aweme\/)?(feed|post)\/ url script-response-body https://raw.githubusercontent.com/KOP-XIAO/QuantumultX/master/Aweme.js
[MITM]
hostname = aweme*.snssdk.com
**********************************************************/

35
Scripts/aimeiju.js Normal file
View File

@@ -0,0 +1,35 @@
var body = $response.body;
var url = $request.url;
const path1 = "/app/ios/user/index";
const path2 = "/app/ios/vod/show";
const path3 = "/app/ios/ads/index";
if (url.indexOf(path1) != -1){
let obj = JSON.parse(body);
obj.data.user["viptime"] = "2066-01-01 08:00:00";
obj.data.user["cion"] = "66666";
obj.data.user["vip"] = "1";
body = JSON.stringify(obj);
}
if (url.indexOf(path2) != -1){
let obj = JSON.parse(body);
obj.data["looktime"] = -1;
obj.data["vip"] = "4";
body = JSON.stringify(obj);
}
if (url.indexOf(path3) != -1){
let obj = JSON.parse(body);
obj.data["pic"] = "http://ww1.sinaimg.cn/large/0076dY5Wgy1g36mmbdvv7j30gf0zkwf2.jpg";
obj.data["url"] = "https://t.me/meetaclub";
body = JSON.stringify(obj);
}
$done({body});
// Made by Meeta(爱美剧)官网下载app.meiju2018.com
// https?:\/\/mjappaz.yefu365.com\/index.php\/app\/ios\/
// hostname = mjappaz.yefu365.com

1
Scripts/test Normal file
View File

@@ -0,0 +1 @@
- DOMAIN-KEYWORD,dlercloud.com,Proxy

12
Scripts/test.js Normal file
View File

@@ -0,0 +1,12 @@
// $request, $response, $notify(title, message), console.log(message)
// $request.scheme, $request.method, $request.url, $request.path, $request.body, $request.headers
// $response.statusCode, $response.headers, $response.body
//var body = $response.body;
//var obj = JSON.parse(body);
$notify("HAHA", "Sucess");
//obj['result'] = 0;
//body = JSON.stringify(obj);
//$done(body);

30
Scripts/weather.js Normal file
View File

@@ -0,0 +1,30 @@
const weaapi = "https://www.tianqiapi.com/api/?version=v6"
$request(weaapi, function(error, response, data){
if (error){
console.log(error);
$done();
} else {
var obj = JSON.parse(data);
console.log(obj);
var city = "所在城市: " + obj.city;
var wea = "天气状况: " + obj.wea + " 当前" + obj.tem + "℃ " + obj.tem2 + "℃~" + obj.tem1 + "℃";
var air = "当前风力: " + obj.win + obj.win_speed + " 风速" + obj.win_meter + "\n空气指数 " + obj.air + " " + obj.air_level + "\n友情提示 " + obj.air_tips + "\n更新时间 " + obj.date + " "+ obj.update_time;
let wmation = [city,wea,air];
$notify("Weather Condition:", wmation[0]+ wmation[1]+ wmation[2]);
$done();
}
}
);
/*****************************************************************
修改自https://meetagit.github.io/MeetaRules/Surge/Scripting/hourlyWeather.js
[Script]
# 在每天 8:00-20:00 整点预报天气
cron "0 8-20 * * *" script-path=https://raw.githubusercontent.com/ydzydzydz/Rules/master/js/weather.js
*****************************************************************/