Skip to content

tctibbs/oreilly-epub-downloader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

O'Reilly EPUB Downloader

Python 3.11+ License: MIT

A CLI to download O'Reilly books as EPUB for offline reading. Uses cookie-based authentication to access your subscription content and generates clean EPUBs with images, cover art, and proper chapter structure.

Installation

pip install -e .

Usage

1. Export cookies from O'Reilly

  1. Log into https://learning.oreilly.com in your browser
  2. Open Developer Tools (Cmd+Option+I)
  3. Go to Console and run:
    JSON.stringify(Object.fromEntries(document.cookie.split('; ').map(c => c.split('='))))
  4. Save the output to cookies.json

2. Download books

# By book ID
oreilly-dl 9781098166298 -c cookies.json

# By URL
oreilly-dl "https://learning.oreilly.com/library/view/ai-engineering/9781098166298/" -c cookies.json

# Custom output path
oreilly-dl 9781098166298 -c cookies.json -o "My Book.epub"

Example output:

Example output

Books are saved to ./downloads/ by default.

Finding Book IDs

The book ID is the number in the O'Reilly URL:

  • URL: https://learning.oreilly.com/library/view/ai-engineering/9781098166298/
  • Book ID: 9781098166298

Refreshing Cookies

Cookies expire periodically. When downloads fail, re-export cookies from your browser.

Requirements

  • Python 3.11+
  • Active O'Reilly Learning subscription

About

Download O'Reilly books as EPUB with images for offline reading

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages