-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathxiaohongshu.js
58 lines (50 loc) · 2.67 KB
/
xiaohongshu.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/****************************************
项目功能:小红书去开屏广告、瀑布流广告、启动广告
使用声明:仅供学习与交流,请勿转载与贩卖!⚠️⚠️⚠️
*****************************************
[rewrite_local]
^https?:\/\/edith\.xiaohongshu\.com\/api\/sns\/v\d\/system_service\/splash_config url script-response-body https://raw.githubusercontent.com/chxm1023/Advertising/main/xiaohongshu.js
^https?:\/\/edith\.xiaohongshu\.com\/api\/sns\/v\d\/homefeed\? url script-response-body https://raw.githubusercontent.com/chxm1023/Advertising/main/xiaohongshu.js
^https?:\/\/edith\.xiaohongshu\.com\/api\/sns\/v\d\/system_service\/config\? url script-response-body https://raw.githubusercontent.com/chxm1023/Advertising/main/xiaohongshu.js
^https?:\/\/edith\.xiaohongshu\.com\/api\/sns\/v\d\/search\/hot_list url response-body items":\[.+\] response-body items":[]
^https?:\/\/edith\.xiaohongshu\.com\/api\/sns\/v\d\/search\/trending url response-body queries":\[.+\] response-body queries":[]
^https?:\/\/www\.xiaohongshu\.com\/api\/sns\/v\d\/tag\/ads_engage url reject-dict
^https?:\/\/www\.xiaohongshu\.com\/api\/sns\/v\d\/ads\/apple\/record url reject-dict
^https?:\/\/www\.xiaohongshu\.com\/api\/sns\/v\d\/ads\/resource url reject-dict
^https?:\/\/referee\.xiaohongshu\.com\/v\d\/stateReport url reject-dict
^https?:\/\/pages\.xiaohongshu\.com\/data\/native\/matrix_switches url reject-dict
^https?:\/\/edith\.xiaohongshu\.com\/api\/sns\/v\d\/user\/teenager\/status url reject-dict
[mitm]
hostname = *.xiaohongshu.com
****************************************/
if (/^https?:\/\/edith\.xiaohongshu\.com\/api\/sns\/v\d\/system_service\/splash_config/.test($request.url)) {
var obj = JSON.parse($response.body);
obj.data.ads_groups.forEach((item) => {
item.start_time = "2208963661";
item.end_time = "2209050061";
item.ads.forEach((i) => {
i.start_time = "2208963661";
i.end_time = "2209050061";
});
});
$done({
body: JSON.stringify(obj),
});
}
if (/^https?:\/\/edith\.xiaohongshu\.com\/api\/sns\/v\d\/homefeed\?/.test($request.url)) {
var obj = JSON.parse($response.body);
obj.data = Object.values(obj.data).filter((item) => !item.is_ads);
$done({
body: JSON.stringify(obj),
});
}
if (/^https?:\/\/edith\.xiaohongshu\.com\/api\/sns\/v\d\/system_service\/config\?/.test($request.url)) {
var obj = JSON.parse($response.body);
//obj.data.tabbar.tabs = Object.values(obj.data.tabbar.tabs).filter((item) => !item.title == "购买");
delete obj.data.store;
delete obj.data.splash;
delete obj.data.loading_img;
$done({
body: JSON.stringify(obj),
});
}