[哲也] 增加一些功能

This commit is contained in:
blackmatrix7 2023-02-11 09:05:40 +08:00
parent c1019ccb1c
commit 3bc776aa28
10 changed files with 187 additions and 1319 deletions

View File

@ -159,7 +159,8 @@
"zhihu_blocked_users",
"zhihu_current_userinfo",
"zhihu_keyword_block",
"zhihu_black_answers"
"zhihu_black_answers",
"zheye_server_url"
],
"author": "@blackmatrix7",
"repo": "https://github.com/blackmatrix7/ios_rule_script/tree/master/script/zheye",
@ -264,6 +265,30 @@
"type": "boolean",
"desc": "在知乎回答中提示付费或营销内容"
},
{
"id": "zhihu_settings_check_paid_content",
"name": "推荐页中提示付费/营销/购物推广",
"val": false,
"type": "boolean",
"desc": "需要额外消耗流量,可能会影响推荐页加载速度"
},
{
"id": "zhihu_settings_request_content",
"name": "推荐页主动探测内容的方式",
"val": "local",
"type": "radios",
"items": [
{
"key": "local",
"label": "本地"
},
{
"key": "cloud",
"label": "云端"
}
],
"desc": "开启推荐页中推广内容提示时,需要配置主动探测方式。默认为本地,使用云端需要在下方配置中填写服务端地址。"
},
{
"id": "zhihu_credit_score",
"name": "自定义用户盐值",
@ -284,6 +309,13 @@
"val": "",
"type": "textarea",
"desc": "必须是JSON格式Key为用户Id不要修改。格式不正确可能导致执行异常。"
},
{
"id": "zheye_server_url",
"name": "哲也同学服务端",
"val": "",
"type": "input",
"desc": "用于解锁更多功能。示例 http://192.168.1.200:52273 。"
}
]
},

View File

@ -1,34 +1,24 @@
# 哲也同学
## 安装说明
### Surge
模块
## 模块
```ini
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/zheye/zheye.sgmodule
```
### Quantumult X
重写
## 重写
```ini
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/zheye/zheye.snippet
```
### Loon
插件
## 插件
```ini
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/zheye/zheye.lnplugin
```
### Stash
覆写
## 覆写
```ini
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/zheye/zheye.stoverride

View File

@ -0,0 +1,36 @@
# -*-coding:utf-8-*-
import asyncio
import aiohttp
from fastapi import FastAPI
app = FastAPI()
async def fetch(session, url):
if url and url.startswith('https://www.zhihu.com/appview/v2/answer'):
async with session.get(url) as resp:
return await resp.text()
else:
return ""
@app.post("/api/v1/answer/links")
async def request_zhihu_answers(links: list[str]):
loop = asyncio.get_event_loop()
tasks = []
async with aiohttp.ClientSession() as session:
for link in links:
tasks.append(loop.create_task(fetch(session, link)))
responses = await asyncio.gather(*tasks)
result = []
for link, response in zip(links, responses):
if ('查看完整内容' in response or '查看全部章节' in response) and 'paid' in response:
result.append("付费内容")
elif 'ad-link-card' in response or 'xg.zhihu.com' in response or '营销平台' in response:
result.append("营销推广")
elif 'mcn-link-card' in response:
result.append("购物推广")
else:
result.append("")
return result

Binary file not shown.

View File

@ -0,0 +1,50 @@
addEventListener("fetch", (event) => {
if (event.request.method === "POST" && event.request.url.endsWith("api/v1/answer/links")) {
event.respondWith(handlePostRequest(event.request));
} else {
event.respondWith(new Response('Forbidden', {status: 403}));
}
});
async function handlePostRequest(request) {
let requestBody = await request.json();
let promise = [];
let checkResult = [];
for (let link of requestBody) {
promise.push(_request(link));
}
await Promise.all(promise).then(result => {
checkResult = result;
})
let bodyString = JSON.stringify(checkResult);
return new Response(bodyString, {status: 200});
}
async function _request(url) {
return new Promise(resolve => {
if (!url || url === "" || !url.startsWith("https://www.zhihu.com/appview/v2/answer")) {
resolve("");
} else {
fetch(url).then(async resp => {
let responseText = await resp.text();
// 付费内容
if ((responseText.indexOf("查看完整内容") >= 0 || responseText.indexOf("查看全部章节") >= 0) && responseText.indexOf("paid") >= 0) {
resolve("付费内容");
}
// 营销推广提醒
else if (responseText.indexOf("ad-link-card") >= 0 || responseText.indexOf("xg.zhihu.com") >= 0 || responseText.indexOf("营销平台") >= 0) {
resolve("营销推广");
}
// 购物推广提醒
else if (responseText.indexOf("mcn-link-card") >= 0) {
resolve("购物推广");
} else {
resolve("");
}
}).catch(err => {
console.log(err);
resolve("");
});
}
});
}

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
#!name=哲也同学
#!desc=哲也同学,你的阅读小助手
#!desc=人在蒙古,刚下航母
#!openUrl=https://github.com/blackmatrix7/ios_rule_script
#!author=blackmatrix7
#!homepage=https://github.com/blackmatrix7/ios_rule_script
@ -20,7 +20,6 @@ DOMAIN,appcloud.zhihu.com,REJECT
DOMAIN,appcloud2.in.zhihu.com,REJECT
[URL Rewrite]
# 拦截DNS解析
^https?:\/\/118\.89\.204\.198 - reject-dict
^https?:\/\/103\.41\.167\.237 - reject-dict
^https?:\/\/2402:4e00:1200:ed00:0:9089:6dac:96b6 - reject-dict
@ -48,59 +47,60 @@ DOMAIN,appcloud2.in.zhihu.com,REJECT
^https?:\/\/api\.zhihu\.com\/feed\/render\/revisit\/tag_config - reject-dict
# 暂不清楚作用
^https?:\/\/api\.zhihu\.com\/commercial_api\/banners_v3\/app_topstory_banner - reject-dict
^https?:\/\/api\.zhihu\.com\/ad-style-service\/request - reject-dict
[Script]
# 获取用户信息 - 隔离用户数据,开启本地会员等
http-response ^https?:\/\/api\.zhihu\.com\/people\/ requires-body=1,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/zheye/zheye.js,tag=哲也_处理用户信息
http-response ^https?:\/\/api\.zhihu\.com\/people\/ requires-body=1,script-path=https://gist.githubusercontent.com/blackmatrix7/f5f780d0f56b319b6ad9848fd080bb18/raw/zheye.min.js,tag=哲也_处理用户信息
# 关键词屏蔽 - 解锁本地的关键词屏蔽功能需要开启本地VIP
http-request ^https?:\/\/api\.zhihu\.com\/feed-root\/block script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/zheye/zheye.js,tag=哲也_解锁关键词屏蔽
http-request ^https?:\/\/api\.zhihu\.com\/feed-root\/block script-path=https://gist.githubusercontent.com/blackmatrix7/f5f780d0f56b319b6ad9848fd080bb18/raw/zheye.min.js,tag=哲也_解锁关键词屏蔽
# 优化软件配置 - 优化下发的配置文件来实现某些效果
http-response ^https?:\/\/m-cloud\.zhihu\.com\/api\/cloud\/config\/all\? requires-body=1,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/zheye/zheye.js,tag=哲也_优化软件配置1
http-response ^https?:\/\/appcloud2\.zhihu\.com\/v\d+\/config requires-body=1,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/zheye/zheye.js,tag=哲也_优化软件配置2
http-response ^https?:\/\/m-cloud\.zhihu\.com\/api\/cloud\/config\/all\? requires-body=1,script-path=https://gist.githubusercontent.com/blackmatrix7/f5f780d0f56b319b6ad9848fd080bb18/raw/zheye.min.js,tag=哲也_优化软件配置1
http-response ^https?:\/\/appcloud2\.zhihu\.com\/v\d+\/config requires-body=1,script-path=https://gist.githubusercontent.com/blackmatrix7/f5f780d0f56b319b6ad9848fd080bb18/raw/zheye.min.js,tag=哲也_优化软件配置2
# 用户信息 - 修改用户盐值
http-response ^https?:\/\/api\.zhihu\.com\/user-credit\/basis requires-body=1,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/zheye/zheye.js,tag=哲也_修改用户盐值
http-response ^https?:\/\/api\.zhihu\.com\/user-credit\/basis requires-body=1,script-path=https://gist.githubusercontent.com/blackmatrix7/f5f780d0f56b319b6ad9848fd080bb18/raw/zheye.min.js,tag=哲也_修改用户盐值
# 关注页 - 内容优化及屏蔽转发的黑名单用户想法
http-response ^https?:\/\/api\.zhihu\.com\/moments_v3\? requires-body=1,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/zheye/zheye.js,tag=哲也_关注列表优化
http-response ^https?:\/\/api\.zhihu\.com\/moments_v3\? requires-body=1,script-path=https://gist.githubusercontent.com/blackmatrix7/f5f780d0f56b319b6ad9848fd080bb18/raw/zheye.min.js,tag=哲也_关注列表优化
# 推荐页 - 移除黑名单用户发布的文章、去除广告,及自定义一些屏蔽项目
http-response ^https:\/\/api\.zhihu\.com\/topstory\/recommend\? requires-body=1,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/zheye/zheye.js,tag=哲也_推荐页优化
http-response ^https:\/\/api\.zhihu\.com\/topstory\/recommend\? requires-body=1,script-path=https://gist.githubusercontent.com/blackmatrix7/f5f780d0f56b319b6ad9848fd080bb18/raw/zheye.min.js,tag=哲也_推荐页优化
# 黑名单页 - 同步黑名单数据
http-response ^https?:\/\/api\.zhihu\.com\/settings\/blocked_users requires-body=1,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/zheye/zheye.js,tag=哲也_同步黑名单
http-response ^https?:\/\/api\.zhihu\.com\/settings\/blocked_users requires-body=1,script-path=https://gist.githubusercontent.com/blackmatrix7/f5f780d0f56b319b6ad9848fd080bb18/raw/zheye.min.js,tag=哲也_同步黑名单
# 问题的回答列表 - 移除黑名单用户的回答、去除广告
http-response ^https?:\/\/api\.zhihu\.com\/(v4\/)?questions\/\d+ requires-body=1,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/zheye/zheye.js,tag=哲也_回答列表优化
http-response ^https?:\/\/api\.zhihu\.com\/(v4\/)?questions\/\d+ requires-body=1,script-path=https://gist.githubusercontent.com/blackmatrix7/f5f780d0f56b319b6ad9848fd080bb18/raw/zheye.min.js,tag=哲也_回答列表优化
# 回答信息流 - 移除黑名单用户的回答、去除广告
^https?:\/\/api\.zhihu\.com\/next-data requires-body=1,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/zheye/zheye.js,tag=哲也_回答信息流优化
^https?:\/\/api\.zhihu\.com\/next-data requires-body=1,script-path=https://gist.githubusercontent.com/blackmatrix7/f5f780d0f56b319b6ad9848fd080bb18/raw/zheye.min.js,tag=哲也_回答信息流优化
# 回答页底部评论摘要 - 移除黑名单用户发表的评论
http-response ^https?:\/\/www\.zhihu\.com\/api\/v4\/comment_v5\/answers\/\d+\/abstract_comment\? requires-body=1,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/zheye/zheye.js,tag=哲也_评论摘要优化
http-response ^https?:\/\/www\.zhihu\.com\/api\/v4\/comment_v5\/answers\/\d+\/abstract_comment\? requires-body=1,script-path=https://gist.githubusercontent.com/blackmatrix7/f5f780d0f56b319b6ad9848fd080bb18/raw/zheye.min.js,tag=哲也_评论摘要优化
# 评论页及子页面 - 去除黑名单用户发表的评论
http-response ^https?:\/\/api\.zhihu\.com\/(comment_v5\/)?(answers|comments?|articles|pins)\/\d+\/(root_|child_)?comments? requires-body=1,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/zheye/zheye.js,tag=哲也_评论优化
http-response ^https?:\/\/api\.zhihu\.com\/(comment_v5\/)?(answers|comments?|articles|pins)\/\d+\/(root_|child_)?comments? requires-body=1,script-path=https://gist.githubusercontent.com/blackmatrix7/f5f780d0f56b319b6ad9848fd080bb18/raw/zheye.min.js,tag=哲也_评论优化
# 消息页 - 折叠官方消息、屏蔽营销消息
http-response ^https?:\/\/api\.zhihu\.com\/notifications\/v3\/(message|timeline\/entry\/system_message) requires-body=1,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/zheye/zheye.js,tag=哲也_消息优化
http-response ^https?:\/\/api\.zhihu\.com\/notifications\/v3\/(message|timeline\/entry\/system_message) requires-body=1,script-path=https://gist.githubusercontent.com/blackmatrix7/f5f780d0f56b319b6ad9848fd080bb18/raw/zheye.min.js,tag=哲也_消息优化
# 回答页 - 内容优化,付费、营销、推广内容文首提醒
http-response ^https?:\/\/www\.zhihu\.com\/appview\/v2\/answer\/.*(entry=(?!(preload-topstory|preload-search|preload-subscription)))? requires-body=1,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/zheye/zheye.js,tag=哲也_回答内容优化
http-response ^https?:\/\/www\.zhihu\.com\/appview\/v2\/answer\/.*(entry=(?!(preload-topstory|preload-search|preload-subscription)))? requires-body=1,script-path=https://gist.githubusercontent.com/blackmatrix7/f5f780d0f56b319b6ad9848fd080bb18/raw/zheye.min.js,tag=哲也_回答内容优化
# 回答页 - 屏蔽下翻出现的黑名单用户的回答
http-response ^https?:\/\/api\.zhihu\.com\/next\? requires-body=1,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/zheye/zheye.js,tag=哲也_回答翻页优化
http-response ^https?:\/\/api\.zhihu\.com\/next\? requires-body=1,script-path=https://gist.githubusercontent.com/blackmatrix7/f5f780d0f56b319b6ad9848fd080bb18/raw/zheye.min.js,tag=哲也_回答翻页优化
# 文章页 - 去除底部广告
http-response ^https?:\/\/www\.zhihu\.com\/api\/v\d\/articles\/\d+\/recommendation\? requires-body=1,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/zheye/zheye.js,tag=哲也_文章优化
http-response ^https?:\/\/www\.zhihu\.com\/api\/v\d\/articles\/\d+\/recommendation\? requires-body=1,script-path=https://gist.githubusercontent.com/blackmatrix7/f5f780d0f56b319b6ad9848fd080bb18/raw/zheye.min.js,tag=哲也_文章优化
# 热榜页 - 去除广告
http-response ^https?:\/\/api\.zhihu\.com\/topstory\/hot-lists?(\?|\/) requires-body=1,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/zheye/zheye.js,tag=哲也_热榜优化
http-response ^https?:\/\/api\.zhihu\.com\/topstory\/hot-lists?(\?|\/) requires-body=1,script-path=https://gist.githubusercontent.com/blackmatrix7/f5f780d0f56b319b6ad9848fd080bb18/raw/zheye.min.js,tag=哲也_热榜优化
# 搜索页 - 去除预置广告
http-response ^https?:\/\/api\.zhihu\.com\/search\/preset_words\? requires-body=1,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/zheye/zheye.js,tag=哲也_预置关键词优化
http-response ^https?:\/\/api\.zhihu\.com\/search\/preset_words\? requires-body=1,script-path=https://gist.githubusercontent.com/blackmatrix7/f5f780d0f56b319b6ad9848fd080bb18/raw/zheye.min.js,tag=哲也_预置关键词优化
[MITM]
hostname = 118.89.204.198,103.41.167.237,2402:4e00:1200:ed00:0:9089:6dac:96b6,www.zhihu.com,api.zhihu.com,zhuanlan.zhihu.com,appcloud2.zhihu.com,m-cloud.zhihu.com,103.41.167.236,103.41.167.234,103.41.167.235,103.41.167.226

View File

@ -1,5 +1,5 @@
#!name=哲也同学
#!desc=哲也同学,你的阅读小助手
#!desc=分享你刚编的故事
[Rule]
# 拦截开屏广告
@ -15,9 +15,7 @@ DOMAIN,crash2.zhihu.com,REJECT
DOMAIN,appcloud.zhihu.com,REJECT
DOMAIN,appcloud2.in.zhihu.com,REJECT
[Map Local]
# 拦截DNS解析
^https?:\/\/118\.89\.204\.198 data="https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/blank/blank_dict.json"
^https?:\/\/103\.41\.167\.237 data="https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/blank/blank_dict.json"
^https?:\/\/2402:4e00:1200:ed00:0:9089:6dac:96b6 data="https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/blank/blank_dict.json"
@ -45,59 +43,60 @@ DOMAIN,appcloud2.in.zhihu.com,REJECT
^https?:\/\/api\.zhihu\.com\/feed\/render\/revisit\/tag_config data="https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/blank/blank_dict.json"
# 暂不清楚作用
^https?:\/\/api\.zhihu\.com\/commercial_api\/banners_v3\/app_topstory_banner data="https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/blank/blank_dict.json"
^https?:\/\/api\.zhihu\.com\/ad-style-service\/request data="https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/blank/blank_dict.json"
[Script]
# 获取用户信息 - 隔离用户数据,开启本地会员等
哲也_处理用户信息 = type=http-response,requires-body=1,max-size=0,pattern=^https?:\/\/api\.zhihu\.com\/people\/,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/zheye/zheye.js
哲也_处理用户信息 = type=http-response,requires-body=1,max-size=0,pattern=^https?:\/\/api\.zhihu\.com\/people\/,script-path=https://gist.githubusercontent.com/blackmatrix7/f5f780d0f56b319b6ad9848fd080bb18/raw/zheye.min.js
# 关键词屏蔽 - 解锁本地的关键词屏蔽功能需要开启本地VIP
哲也_解锁关键词屏蔽 = type=http-request,requires-body=1,max-size=0,pattern=^https?:\/\/api\.zhihu\.com\/feed-root\/block,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/zheye/zheye.js
哲也_解锁关键词屏蔽 = type=http-request,requires-body=1,max-size=0,pattern=^https?:\/\/api\.zhihu\.com\/feed-root\/block,script-path=https://gist.githubusercontent.com/blackmatrix7/f5f780d0f56b319b6ad9848fd080bb18/raw/zheye.min.js
# 优化软件配置 - 优化下发的配置文件来实现某些效果
哲也_优化软件配置1 = type=http-response,requires-body=1,max-size=0,pattern=^https?:\/\/m-cloud\.zhihu\.com\/api\/cloud\/config\/all\?,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/zheye/zheye.js
哲也_优化软件配置2 = type=http-response,requires-body=1,max-size=0,pattern=^https?:\/\/appcloud2\.zhihu\.com\/v\d+\/config,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/zheye/zheye.js
哲也_优化软件配置1 = type=http-response,requires-body=1,max-size=0,pattern=^https?:\/\/m-cloud\.zhihu\.com\/api\/cloud\/config\/all\?,script-path=https://gist.githubusercontent.com/blackmatrix7/f5f780d0f56b319b6ad9848fd080bb18/raw/zheye.min.js
哲也_优化软件配置2 = type=http-response,requires-body=1,max-size=0,pattern=^https?:\/\/appcloud2\.zhihu\.com\/v\d+\/config,script-path=https://gist.githubusercontent.com/blackmatrix7/f5f780d0f56b319b6ad9848fd080bb18/raw/zheye.min.js
# 用户信息 - 修改用户盐值
修改用户盐值 = type=http-response,requires-body=1,max-size=0,pattern=^https?:\/\/api\.zhihu\.com\/user-credit\/basis,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/zheye/zheye.js
修改用户盐值 = type=http-response,requires-body=1,max-size=0,pattern=^https?:\/\/api\.zhihu\.com\/user-credit\/basis,script-path=https://gist.githubusercontent.com/blackmatrix7/f5f780d0f56b319b6ad9848fd080bb18/raw/zheye.min.js
# 关注页 - 内容优化及屏蔽转发的黑名单用户想法
哲也_关注列表优化 = type=http-response,requires-body=1,max-size=0,pattern=^https?:\/\/api\.zhihu\.com\/moments_v3\?,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/zheye/zheye.js
哲也_关注列表优化 = type=http-response,requires-body=1,max-size=0,pattern=^https?:\/\/api\.zhihu\.com\/moments_v3\?,script-path=https://gist.githubusercontent.com/blackmatrix7/f5f780d0f56b319b6ad9848fd080bb18/raw/zheye.min.js
# 推荐页 - 移除黑名单用户发布的文章、去除广告,及自定义一些屏蔽项目
哲也_推荐页优化 = type=http-response,requires-body=1,max-size=0,pattern=^https:\/\/api\.zhihu\.com\/topstory\/recommend\?,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/zheye/zheye.js
哲也_推荐页优化 = type=http-response,requires-body=1,max-size=0,pattern=^https:\/\/api\.zhihu\.com\/topstory\/recommend\?,script-path=https://gist.githubusercontent.com/blackmatrix7/f5f780d0f56b319b6ad9848fd080bb18/raw/zheye.min.js
# 黑名单页 - 同步黑名单数据
哲也_同步黑名单 = type=http-response,requires-body=1,max-size=0,pattern=^https?:\/\/api\.zhihu\.com\/settings\/blocked_users,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/zheye/zheye.js
哲也_同步黑名单 = type=http-response,requires-body=1,max-size=0,pattern=^https?:\/\/api\.zhihu\.com\/settings\/blocked_users,script-path=https://gist.githubusercontent.com/blackmatrix7/f5f780d0f56b319b6ad9848fd080bb18/raw/zheye.min.js
# 问题的回答列表 - 移除黑名单用户的回答、去除广告
哲也_回答列表优化 = type=http-response,requires-body=1,max-size=0,pattern=^https?:\/\/api\.zhihu\.com\/(v4\/)?questions\/\d+,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/zheye/zheye.js
哲也_回答列表优化 = type=http-response,requires-body=1,max-size=0,pattern=^https?:\/\/api\.zhihu\.com\/(v4\/)?questions\/\d+,script-path=https://gist.githubusercontent.com/blackmatrix7/f5f780d0f56b319b6ad9848fd080bb18/raw/zheye.min.js
# 回答信息流 - 移除黑名单用户的回答、去除广告
哲也_回答信息流优化 = type=http-response,requires-body=1,max-size=0,pattern=^https?:\/\/api\.zhihu\.com\/next-data,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/zheye/zheye.js
哲也_回答信息流优化 = type=http-response,requires-body=1,max-size=0,pattern=^https?:\/\/api\.zhihu\.com\/next-data,script-path=https://gist.githubusercontent.com/blackmatrix7/f5f780d0f56b319b6ad9848fd080bb18/raw/zheye.min.js
# 回答页底部评论摘要 - 移除黑名单用户发表的评论
哲也_评论摘要优化 = type=http-response,requires-body=1,max-size=0,pattern=^https?:\/\/www\.zhihu\.com\/api\/v4\/comment_v5\/answers\/\d+\/abstract_comment\?,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/zheye/zheye.js
哲也_评论摘要优化 = type=http-response,requires-body=1,max-size=0,pattern=^https?:\/\/www\.zhihu\.com\/api\/v4\/comment_v5\/answers\/\d+\/abstract_comment\?,script-path=https://gist.githubusercontent.com/blackmatrix7/f5f780d0f56b319b6ad9848fd080bb18/raw/zheye.min.js
# 评论页及子页面 - 去除黑名单用户发表的评论
哲也_评论优化 = type=http-response,requires-body=1,max-size=0,pattern=^https?:\/\/api\.zhihu\.com\/(comment_v5\/)?(answers|comments?|articles|pins)\/\d+\/(root_|child_)?comments?,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/zheye/zheye.js
哲也_评论优化 = type=http-response,requires-body=1,max-size=0,pattern=^https?:\/\/api\.zhihu\.com\/(comment_v5\/)?(answers|comments?|articles|pins)\/\d+\/(root_|child_)?comments?,script-path=https://gist.githubusercontent.com/blackmatrix7/f5f780d0f56b319b6ad9848fd080bb18/raw/zheye.min.js
# 消息页 - 折叠官方消息、屏蔽营销消息
哲也_消息优化 = type=http-response,requires-body=1,max-size=0,pattern=^https?:\/\/api\.zhihu\.com\/notifications\/v3\/(message|timeline\/entry\/system_message),script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/zheye/zheye.js
哲也_消息优化 = type=http-response,requires-body=1,max-size=0,pattern=^https?:\/\/api\.zhihu\.com\/notifications\/v3\/(message|timeline\/entry\/system_message),script-path=https://gist.githubusercontent.com/blackmatrix7/f5f780d0f56b319b6ad9848fd080bb18/raw/zheye.min.js
# 回答页 - 内容优化,付费、营销、推广内容文首提醒
哲也_回答内容优化 = type=http-response,requires-body=1,max-size=0,pattern=^https?:\/\/www\.zhihu\.com\/appview\/v2\/answer\/.*(entry=(?!(preload-topstory|preload-search|preload-subscription)))?,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/zheye/zheye.js
哲也_回答内容优化 = type=http-response,requires-body=1,max-size=0,pattern=^https?:\/\/www\.zhihu\.com\/appview\/v2\/answer\/.*(entry=(?!(preload-topstory|preload-search|preload-subscription)))?,script-path=https://gist.githubusercontent.com/blackmatrix7/f5f780d0f56b319b6ad9848fd080bb18/raw/zheye.min.js
# 回答页 - 屏蔽下翻出现的黑名单用户的回答
哲也_回答翻页优化 = type=http-response,requires-body=1,max-size=0,pattern=^https?:\/\/api\.zhihu\.com\/next\?,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/zheye/zheye.js
哲也_回答翻页优化 = type=http-response,requires-body=1,max-size=0,pattern=^https?:\/\/api\.zhihu\.com\/next\?,script-path=https://gist.githubusercontent.com/blackmatrix7/f5f780d0f56b319b6ad9848fd080bb18/raw/zheye.min.js
# 文章页 - 去除底部广告
哲也_文章优化 = type=http-response,requires-body=1,max-size=0,pattern=^https?:\/\/www\.zhihu\.com\/api\/v\d\/articles\/\d+\/recommendation\?,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/zheye/zheye.js
哲也_文章优化 = type=http-response,requires-body=1,max-size=0,pattern=^https?:\/\/www\.zhihu\.com\/api\/v\d\/articles\/\d+\/recommendation\?,script-path=https://gist.githubusercontent.com/blackmatrix7/f5f780d0f56b319b6ad9848fd080bb18/raw/zheye.min.js
# 热榜页 - 去除广告
哲也_热榜优化 = type=http-response,requires-body=1,max-size=0,pattern=^https?:\/\/api\.zhihu\.com\/topstory\/hot-lists(\?|\/),script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/zheye/zheye.js
哲也_热榜优化 = type=http-response,requires-body=1,max-size=0,pattern=^https?:\/\/api\.zhihu\.com\/topstory\/hot-lists(\?|\/),script-path=https://gist.githubusercontent.com/blackmatrix7/f5f780d0f56b319b6ad9848fd080bb18/raw/zheye.min.js
# 搜索页 - 去除预置广告
哲也_预置关键词优化 = type=http-response,requires-body=1,max-size=0,pattern=^https?:\/\/api\.zhihu\.com\/search\/preset_words\?,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/zheye/zheye.js
哲也_预置关键词优化 = type=http-response,requires-body=1,max-size=0,pattern=^https?:\/\/api\.zhihu\.com\/search\/preset_words\?,script-path=https://gist.githubusercontent.com/blackmatrix7/f5f780d0f56b319b6ad9848fd080bb18/raw/zheye.min.js
[MITM]
hostname = %APPEND% 118.89.204.198,103.41.167.237,2402:4e00:1200:ed00:0:9089:6dac:96b6,www.zhihu.com,api.zhihu.com,zhuanlan.zhihu.com,appcloud2.zhihu.com,m-cloud.zhihu.com,103.41.167.236,103.41.167.234,103.41.167.235,103.41.167.226

View File

@ -1,7 +1,6 @@
# 哲也同学
# 哲也同学,你的阅读小助手
# 先问是不是再问为什么
# 拦截DNS解析
^https?:\/\/118\.89\.204\.198 url reject-dict
^https?:\/\/103\.41\.167\.237 url reject-dict
^https?:\/\/2402:4e00:1200:ed00:0:9089:6dac:96b6 url reject-200
@ -49,57 +48,58 @@
# 暂不清楚作用
^https?:\/\/api\.zhihu\.com\/commercial_api\/banners_v3\/app_topstory_banner url reject-dict
^https?:\/\/api\.zhihu\.com\/ad-style-service\/request url reject
# 获取用户信息 - 隔离用户数据,开启本地会员等
^https?:\/\/api\.zhihu\.com\/people\/ url script-response-body https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/zheye/zheye.js
^https?:\/\/api\.zhihu\.com\/people\/ url script-response-body https://gist.githubusercontent.com/blackmatrix7/f5f780d0f56b319b6ad9848fd080bb18/raw/zheye.min.js
# 关键词屏蔽 - 解锁本地的关键词屏蔽功能需要开启本地VIP
^https?:\/\/api\.zhihu\.com\/feed-root\/block url script-analyze-echo-response https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/zheye/zheye.js
^https?:\/\/api\.zhihu\.com\/feed-root\/block url script-analyze-echo-response https://gist.githubusercontent.com/blackmatrix7/f5f780d0f56b319b6ad9848fd080bb18/raw/zheye.min.js
# 优化软件配置 - 优化下发的配置文件来实现某些效果
^https?:\/\/m-cloud\.zhihu\.com\/api\/cloud\/config\/all\? url script-response-body https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/zheye/zheye.js
^https?:\/\/appcloud2\.zhihu\.com\/v\d+\/config url script-analyze-echo-response https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/zheye/zheye.js
^https?:\/\/m-cloud\.zhihu\.com\/api\/cloud\/config\/all\? url script-response-body https://gist.githubusercontent.com/blackmatrix7/f5f780d0f56b319b6ad9848fd080bb18/raw/zheye.min.js
^https?:\/\/appcloud2\.zhihu\.com\/v\d+\/config url script-analyze-echo-response https://gist.githubusercontent.com/blackmatrix7/f5f780d0f56b319b6ad9848fd080bb18/raw/zheye.min.js
# 用户信息 - 修改用户盐值
^https?:\/\/api\.zhihu\.com\/user-credit\/basis url script-response-body https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/zheye/zheye.js
^https?:\/\/api\.zhihu\.com\/user-credit\/basis url script-response-body https://gist.githubusercontent.com/blackmatrix7/f5f780d0f56b319b6ad9848fd080bb18/raw/zheye.min.js
# 关注页 - 内容优化及屏蔽转发的黑名单用户想法
^https?:\/\/api\.zhihu\.com\/moments_v3\? url script-response-body https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/zheye/zheye.js
^https?:\/\/api\.zhihu\.com\/moments_v3\? url script-response-body https://gist.githubusercontent.com/blackmatrix7/f5f780d0f56b319b6ad9848fd080bb18/raw/zheye.min.js
# 推荐页 - 移除黑名单用户发布的文章、去除广告,及自定义一些屏蔽项目
^https:\/\/api\.zhihu\.com\/topstory\/recommend url script-response-body https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/zheye/zheye.js
^https:\/\/api\.zhihu\.com\/topstory\/recommend url script-response-body https://gist.githubusercontent.com/blackmatrix7/f5f780d0f56b319b6ad9848fd080bb18/raw/zheye.min.js
# 黑名单页 - 同步黑名单数据
^https?:\/\/api\.zhihu\.com\/settings\/blocked_users url script-response-body https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/zheye/zheye.js
^https?:\/\/api\.zhihu\.com\/settings\/blocked_users url script-response-body https://gist.githubusercontent.com/blackmatrix7/f5f780d0f56b319b6ad9848fd080bb18/raw/zheye.min.js
# 问题的回答列表 - 移除黑名单用户的回答、去除广告
^https?:\/\/api\.zhihu\.com\/(v4\/)?questions\/\d+ url script-response-body https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/zheye/zheye.js
^https?:\/\/api\.zhihu\.com\/(v4\/)?questions\/\d+ url script-response-body https://gist.githubusercontent.com/blackmatrix7/f5f780d0f56b319b6ad9848fd080bb18/raw/zheye.min.js
# 回答信息流 - 移除黑名单用户的回答、去除广告
^https?:\/\/api\.zhihu\.com\/next-data url script-response-body https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/zheye/zheye.js
^https?:\/\/api\.zhihu\.com\/next-data url script-response-body https://gist.githubusercontent.com/blackmatrix7/f5f780d0f56b319b6ad9848fd080bb18/raw/zheye.min.js
# 回答页底部评论摘要 - 移除黑名单用户发表的评论
^https?:\/\/www\.zhihu\.com\/api\/v4\/comment_v5\/answers\/\d+\/abstract_comment\? url script-response-body https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/zheye/zheye.js
^https?:\/\/www\.zhihu\.com\/api\/v4\/comment_v5\/answers\/\d+\/abstract_comment\? url script-response-body https://gist.githubusercontent.com/blackmatrix7/f5f780d0f56b319b6ad9848fd080bb18/raw/zheye.min.js
# 评论页及子页面 - 去除黑名单用户发表的评论
^https?:\/\/api\.zhihu\.com\/(comment_v5\/)?(answers|comments?|articles|pins)\/\d+\/(root_|child_)?comments? url script-response-body https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/zheye/zheye.js
^https?:\/\/api\.zhihu\.com\/(comment_v5\/)?(answers|comments?|articles|pins)\/\d+\/(root_|child_)?comments? url script-response-body https://gist.githubusercontent.com/blackmatrix7/f5f780d0f56b319b6ad9848fd080bb18/raw/zheye.min.js
# 消息页 - 折叠官方消息、屏蔽营销消息
^https?:\/\/api\.zhihu\.com\/notifications\/v3\/(message|timeline\/entry\/system_message) url script-response-body https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/zheye/zheye.js
^https?:\/\/api\.zhihu\.com\/notifications\/v3\/(message|timeline\/entry\/system_message) url script-response-body https://gist.githubusercontent.com/blackmatrix7/f5f780d0f56b319b6ad9848fd080bb18/raw/zheye.min.js
# 回答页 - 内容优化,付费、营销、推广内容文首提醒
^https?:\/\/www\.zhihu\.com\/appview\/v2\/answer\/.*(entry=(?!(preload-topstory|preload-search|preload-subscription)))? url script-response-body https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/zheye/zheye.js
^https?:\/\/www\.zhihu\.com\/appview\/v2\/answer\/.*(entry=(?!(preload-topstory|preload-search|preload-subscription)))? url script-response-body https://gist.githubusercontent.com/blackmatrix7/f5f780d0f56b319b6ad9848fd080bb18/raw/zheye.min.js
# 回答页 - 屏蔽下翻出现的黑名单用户的回答
^https?:\/\/api\.zhihu\.com\/next\? url script-response-body https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/zheye/zheye.js
^https?:\/\/api\.zhihu\.com\/next\? url script-response-body https://gist.githubusercontent.com/blackmatrix7/f5f780d0f56b319b6ad9848fd080bb18/raw/zheye.min.js
# 文章页 - 去除底部广告
^https?:\/\/www\.zhihu\.com\/api\/v\d\/articles\/\d+\/recommendation\? url script-response-body https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/zheye/zheye.js
^https?:\/\/www\.zhihu\.com\/api\/v\d\/articles\/\d+\/recommendation\? url script-response-body https://gist.githubusercontent.com/blackmatrix7/f5f780d0f56b319b6ad9848fd080bb18/raw/zheye.min.js
# 热榜页 - 去除广告
^https?:\/\/api\.zhihu\.com\/topstory\/hot-lists?(\?|\/) url script-response-body https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/zheye/zheye.js
^https?:\/\/api\.zhihu\.com\/topstory\/hot-lists?(\?|\/) url script-response-body https://gist.githubusercontent.com/blackmatrix7/f5f780d0f56b319b6ad9848fd080bb18/raw/zheye.min.js
# 搜索页 - 去除预置广告
^https?:\/\/api\.zhihu\.com\/search\/preset_words\? url script-response-body https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/zheye/zheye.js
^https?:\/\/api\.zhihu\.com\/search\/preset_words\? url script-response-body https://gist.githubusercontent.com/blackmatrix7/f5f780d0f56b319b6ad9848fd080bb18/raw/zheye.min.js
hostname = 118.89.204.198,103.41.167.237,2402:4e00:1200:ed00:0:9089:6dac:96b6,www.zhihu.com,api.zhihu.com,zhuanlan.zhihu.com,appcloud2.zhihu.com,m-cloud.zhihu.com,103.41.167.236,103.41.167.234,103.41.167.235,103.41.167.226

View File

@ -1,9 +1,8 @@
name: 哲也同学
desc: 哲也同学,你的阅读小助手
desc: 人在航母,刚下蒙古
http:
rewrite:
# 拦截DNS解析
- ^https?:\/\/118\.89\.204\.198 - reject-dict
- ^https?:\/\/103\.41\.167\.237 - reject-dict
- ^https?:\/\/2402:4e00:1200:ed00:0:9089:6dac:96b6 - reject-dict
@ -13,7 +12,7 @@ http:
# 拦截品牌提问广告
- ^https?:\/\/www\.zhihu\.com\/api\/v\d+\/brand\/question/\d+/card\? - reject-dict
# 屏蔽我的页面开通会员的卡片
- ^https?:\/\/api\.zhihu\.com\/unlimited\/go\/my_card - reject
# - ^https?:\/\/api\.zhihu\.com\/unlimited\/go\/my_card - reject
# 拦截品牌提问广告
- ^https?:\/\/api\.zhihu\.com\/brand\/question\/\d+/card\? - reject-dict
# 屏蔽下发的配置,如皮肤等
@ -38,6 +37,7 @@ http:
- ^https?:\/\/api\.zhihu\.com\/feed\/render\/revisit\/tag_config url reject-dict
# 暂不清楚作用
- ^https?:\/\/api\.zhihu\.com\/commercial_api\/banners_v3\/app_topstory_banner - reject-dict
- ^https?:\/\/api\.zhihu\.com\/ad-style-service\/request - reject-dict
script:
# 获取用户信息 - 隔离用户数据,开启本地会员等
@ -198,6 +198,6 @@ http:
script-providers:
zheye.js:
url: https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/zheye/zheye.js
url: https://gist.githubusercontent.com/blackmatrix7/f5f780d0f56b319b6ad9848fd080bb18/raw/zheye.min.js
interval: 86400