Fundamentals 7 min read

Batch Export CSDN Articles and Convert HTML to Markdown in Minutes

This guide walks you through downloading the Roamer tool, using it to scrape and batch‑export your CSDN articles, handling cookies via cURL, and converting the exported HTML files to clean Markdown with a Node.js service, all with step‑by‑step screenshots.

Python Crawling & Data Mining
Python Crawling & Data Mining
Python Crawling & Data Mining
Batch Export CSDN Articles and Convert HTML to Markdown in Minutes

Introduction

The author shares a practical workflow for backing up CSDN (C站) articles using the Roamer tool developed by a fellow developer, and then converting the exported HTML files to Markdown.

Software Overview

Download the Roamer tool (V0.3) and install it. The interface appears as shown below:

The main features include:

Read articles of a specified user.

Quickly search cached article lists.

Export article link lists (txt, csv, tsv) with metadata.

Copy titles and links instantly.

Batch export your own articles (Markdown or rich‑text, with options for private posts, grouping by date, etc.).

Usage Tutorial

1) Reading Articles

Enter the target user’s ID (e.g., pdcfighting) to view their public articles. If no ID is entered, the tool reads the logged‑in user’s articles.

2) Quick Cookie Input

Copy the cURL (Bash) command that contains your authentication cookie, then use the tool’s “Parse Cookie” utility to save a cookie file in the program’s directory. After checking the cookie, the toolbar shows the logged‑in user.

3) Batch Export Your Articles

Click the Batch Export Articles button to start exporting your posts.

The exported files appear locally as HTML (or Markdown if originally written in Markdown).

4) Convert HTML to Markdown

Install Node.js from https://nodejs.org/zh-cn/download/. Then download the conversion service source code (link provided in the original article) and unzip it.

Run the conversion script: node html2md.js This starts a local service that transforms HTML files to Markdown. After the service is running, re‑export your articles; the previously rich‑text HTML files are now saved as Markdown with minimal formatting loss.

Conclusion

Using the Roamer tool, you can efficiently back up all your CSDN posts and convert them to Markdown without significant loss, making it easy to migrate content to other platforms.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Automationcontent exportHTML to Markdown
Python Crawling & Data Mining
Written by

Python Crawling & Data Mining

Life's short, I code in Python. This channel shares Python web crawling, data mining, analysis, processing, visualization, automated testing, DevOps, big data, AI, cloud computing, machine learning tools, resources, news, technical articles, tutorial videos and learning materials. Join us!

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.