Fetches the static HTML of public webpages over HTTP, converts it to Markdown using Turndown, and saves it locally.
Related Skills
- WeChat Official Account articles →
wechat-article-fetcher - Search WeChat Official Accounts by keyword →
wechat-article-search - Juejin Trending (list only) →
juejin-article-trends
Use Cases
- Public blogs, docs, news pages (server-rendered HTML)
- Make local Markdown backups of pages at existing URLs
Not Applicable
mp.weixin.qq.comlinks → please usewechat-article-fetcher- Pages that require login or payment
- Heavily client-rendered SPAs (React/Vue app shells with an almost empty body)
Installation
cd skills/url-to-markdown
npm install
Requires Node.js >= 14.
Usage
node scripts/url-to-markdown.js <URL> [输出文件路径]
| Parameter | Required | Description |
|---|---|---|
| URL | Yes | Public http(s) link (WeChat links will be rejected) |
| Output file path | No | Default:output.md |
node scripts/url-to-markdown.js https://example.com/post
node scripts/url-to-markdown.js https://docs.example.com/guide ./guide.md
Notes
- Usesstatic HTTP fetching, not browser rendering, so dynamic content may be missing.
- Removes
script/style/noscript/iframetags before conversion. - Keeps remote image links (does not download them locally); hotlink protection may prevent images from displaying.
- TLS certificate verification remainsenabledstatus.
Output Format
# 页面标题
来源:https://example.com/page
…转换后的正文…
FAQ
- Fetch failed: Confirm the URL is publicly accessible; check the network and HTTP status.
- Content is almost empty: It may be an SPA; this tool is not applicable.
- Images won't open: Hotlink protection; the links still point to the original site.