-
在@aoout佬的这个脚本基础上修改:写了一个官方 clipper 的知乎回答剪藏模板(去除知乎 ai 链接,获取作者和发布时间)
-
25年9月20号增加几个功能点:
- 使用CSS选择器,剔除掉所有无关的内容比如多少人赞同、更多回答。专注于回答的内容本身
- 使用CSS选择器,获取回答的发布时间,添加进属性变量
- 使用CSS选择器,获取回答的赞同数量,添加进属性变量
- 使用replace,替换掉标题中偶尔出现的(X封私信)
- 参考@probe佬的回复,剔除掉正文中恶心的知乎关键词解释
- 顺便修改正文内容选择器,现在使用更准确的内容定位
-
以下是配置JSON代码:
{
"schemaVersion": "0.1.0",
"name": "知乎回答 (7)",
"behavior": "create",
"noteContentFormat": "{{selectorHtml:.QuestionAnswer-content .RichText|replace:\"href=\\\"https\\://zhida\":\"\"|markdown}}",
"properties": [
{
"name": "source",
"value": "{{url}}",
"type": "text"
},
{
"name": "author",
"value": "{{selector:.UserLink-link|slice:1,2}}",
"type": "multitext"
},
{
"name": "publicTime",
"value": "{{selector:.QuestionAnswer-content .ContentItem-time span}}",
"type": "text"
},
{
"name": "agreeCount",
"value": "{{selector:.RichContent-actions .VoteButton--up}}",
"type": "text"
}
],
"triggers": [
"https://www.zhihu.com/question/*/answer"
],
"noteNameFormat": "{{title|replace:\" - 知乎\":\"\"|replace:/^\\(.*?\\)/g, \"\"}}",
"path": "00_inbox"
}
-
上面配置的导入方式:
新用户只能上传一幅图,自己找吧( -
效果展示图,原文章地址: