从网络上读取内容

如果给定一个绝对 URL 地址,pandoc 就会通过 HTTP 来获取对应的内容:

pandoc -f html -t markdown https://geekdaxue.co

此时,可以在 header 中指定自定义 User-Agent 或者其他请求头。

pandoc -f html -t markdown --request-header User-Agent:"Mozilla/5.0" \ https://geekdaxue.co