知乎下载器

一键复制知乎文章/回答为Markdown,下载文章/回答为zip(包含素材图片与文章/回答信息),备份你珍贵的回答与文章。

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

Author
Howardzhangdqs
Daily installs
1
Total installs
1,175
Ratings
4 0 1
Version
0.3.26-4e0824
Created
2023-10-30
Updated
2024-03-22
Size
111 KB
License
MIT
Applies to

知乎下载器

一键复制知乎文章/回答/想法为Markdown,下载文章/回答/想法为zip(包含素材图片与文章/回答/想法信息),备份你珍贵的回答与文章。

代码仓库:https://github.com/Howardzhangdqs/zhihu-copy-as-markdown

安装完毕后会在每个回答、想法、文章的左上角出现两个复制为Markdown下载全文为Zip按钮,点击即可复制和下载。

每个问题的标题上会多出一个批量下载按钮,点击后即可下载该问题下所有已经加载的回答为单个Zip。

截图

下载全文为Zip批量下载都会将所有的内容(包括图片、视频等附件)一同打包并下载,备份您和他人的劳动成果。

原理

  1. 获取页面中所有的富文本框 DOM
  2. DOM 使用 ./src/core/lexer.ts 转换为 Lex
  3. Lex 使用 ./src/core/parser.ts 转换为 Markdown

TODO

  • 下载文章时同时包含头图
  • TOC解析
  • Markdown纯文本转义