写了一个官方 clipper 的知乎回答剪藏模板(去除知乎 ai 链接,获取作者和发布时间)

具体代码如下,可以复制后导入到插件中:

知乎回答剪藏模板
{
  "schemaVersion": "0.1.0",
  "name": "知乎回答",
  "behavior": "create",
  "noteContentFormat": "{{contentHtml|replace:\"href=\\\"https\\://zhida\":\"\"|markdown}}",
  "properties": [
    {
      "name": "title",
      "value": "{{title|replace:\\\" - 知乎\\\":\\\"\\\"}}",
      "type": "text"
    },
    {
      "name": "source",
      "value": "{{url}}",
      "type": "text"
    },
    {
      "name": "author",
      "value": "{{selector:.UserLink-link|slice:1,2}}",
      "type": "text"
    },
    {
      "name": "published",
      "value": "{{selector:.ContentItem-time|split|date:\\\"YYYY-MM-DD\\\"}}",
      "type": "date"
    },
    {
      "name": "created",
      "value": "{{date}}",
      "type": "date"
    },
    {
      "name": "description",
      "value": "{{description}}",
      "type": "text"
    }
  ],
  "triggers": [
    "https://www.zhihu.com/question/*/answer"
  ],
  "noteNameFormat": "{{title|replace:\" - 知乎\":\"\"}}",
  "path": ""
}
3 个赞