Substack2Markdown
Download free and premium Substack posts, saving them as Markdown files. Also generates HTML interfaces to allow you to browse and sort the markdown files for each author.
Install / Use
/learn @timf34/Substack2MarkdownREADME
Substack2Markdown
Substack2Markdown is a Python tool for downloading free and premium Substack posts and saving them as both Markdown and HTML files, and includes a simple HTML interface to browse and sort through the posts. It will save paid for content as long as you're subscribed to that substack.
🆕 @Firevvork has built a web version of this tool at Substack Reader - no installation required! (Works for free Substacks only.)

Once you run the script, it will create a folder named after the substack in /substack_md_files,
and then begin to scrape the substack URL, converting the blog posts into markdown files. Once all the posts have been
saved, it will generate an HTML file in /substack_html_pages directory that allows you to browse the posts.
You can either hardcode the substack URL and the number of posts you'd like to save into the top of the file, or specify them as command line arguments.
Features
- Converts Substack posts into Markdown files.
- Generates an HTML file to browse Markdown files.
- Supports free and premium content (with subscription).
- Supports scraping a single post URL directly (for example,
/p/my-post). - Can download Substack-hosted images locally with
--images. - The HTML interface allows sorting essays by date or likes.
Installation
Clone the repo and install the dependencies:
git clone https://github.com/yourusername/substack_scraper.git
cd substack_scraper
# # Optinally create a virtual environment
# python -m venv venv
# # Activate the virtual environment
# .\venv\Scripts\activate # Windows
# source venv/bin/activate # Linux
pip install -r requirements.txt
For the premium scraper, update the config.py in the root directory with your Substack email and password:
EMAIL = "your-email@domain.com"
PASSWORD = "your-password"
You'll also need Microsoft Edge installed for the Selenium webdriver.
Usage
Specify the Substack URL and the directory to save the posts to:
You can hardcode your desired Substack URL and the number of posts you'd like to save into the top of the file and run:
python substack_scraper.py
For free Substack sites:
python substack_scraper.py --url https://example.substack.com --directory /path/to/save/posts
For premium Substack sites:
python substack_scraper.py --url https://example.substack.com --directory /path/to/save/posts --premium
To scrape a single post directly:
python substack_scraper.py --url https://example.substack.com/p/my-post
To download images locally and rewrite markdown image links:
python substack_scraper.py --url https://example.substack.com --images
To scrape a specific number of posts:
python substack_scraper.py --url https://example.substack.com --directory /path/to/save/posts --number 5
Online Version
For a hassle-free experience without any local setup:
- Visit Substack Reader
- Enter the Substack URL you want to read or export
- Click "Go" to instantly view the content or "Export" to download Markdown files
This online version provides a user-friendly web interface for reading and exporting free Substack articles, with no installation required. However, please note that the online version currently does not support exporting premium content. For full functionality, including premium content export, please use the local script as described above. Built by @Firevvork.
Viewing Markdown Files in Browser
To read the Markdown files in your browser, install the Markdown Viewer browser extension. But note, we also save the files as HTML for easy viewing, just set the toggle to HTML on the author homepage.
Or you can use our Substack Reader online tool, which allows you to read and export free Substack articles directly in your browser. (Note: Premium content export is currently only available in the local script version)
Related Skills
node-connect
345.9kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
claude-opus-4-5-migration
106.4kMigrate prompts and code from Claude Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5
frontend-design
106.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
model-usage
345.9kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
