
The O'Reilly learning platform (formerly Safari Books Online) offers subscriptions for access to thousands of eBooks, video courses, and more on technology, programming, and software development. While its mobile app supports offline reading, it doesn't provide DRM-free EPUBs. This guide shows you how to download EPUB versions of your O'Reilly eBooks for greater flexibility.
1. How to Generate EPUB from O'Reilly eBooks with GitHub Tools
Using open-source GitHub tools to convert O'Reilly eBooks into EPUB format can be quite challenging and often requires a bit of perseverance. You might encounter numerous obstacles or even fail to execute the script successfully after several attempts. So, patience is key when using this method.
Step 1Download the SafariBooks Tool
Navigate to the GitHub page for the SafariBooks tool. Click on "Download ZIP" under the "Code" menu to obtain the tool as a ZIP file. Then unzip it.
Step 2Create the cookies.json File from SSO Cookies
We recommend using the FireFox browser for this process:
1. Login as usual to https://learning.oreilly.com/ and access the profile page in the browser: https://learning.oreilly.com/profile/
2. Open the developer tools with F12
3. Go to Network tab in the developer tools
4. In the Network tab, click on the request to /profile/ (it should be the first one)
5. Click on the Cookies tab in the request information
6. Right-click on the Request cookies(start with "orm-jwt") text and select Copy Value
7. Run the sso_cookies.py with the cookies value
See below image, you need to remove the outer section of the JSON document from the cookies value.
If you get all right, the cookie value will be saved into `cookies.json`. Then you can run `safaribooks.py` without the `--cred` argument...
You may need to attempt this process multiple times as it might not work on the first try. So be patient:)
Important:
1. If your O'Reilly credentials contains special character (one of these: !@#$%^&*()), you have to escape them with "\". Or your credentials can not be parsed correctly.
2. If the session expires, you can repeat above steps to get the new cookie value and save them into the `cookies.json`.
Step 3Generate EPUB from your O'Reilly eBooks
Run safaribooks.py script with book ID: python safaribooks.py
You can find the book ID in the URL when you open any book in your playlists. For example: https://learning.oreilly.com/library/view/kubernetes-best-practices/9781098142155/ where the ID is 9781098142155. Once the script completes, an EPUB file will be generated for the specified book.
Important: since the script only download HTML pages and create a raw EPUB, many of the CSS and XML/HTML directives are wrong for an E-Reader.
2. How to Download O'Reilly eBooks as EPUB Using Paid Software
If you're not particularly tech-savvy, the best approach to remove DRM from your O'Reilly eBooks and download them as EPUB files is to use professional third-party paid software - Epubor OR Converter. It is easy to use, time-saving, and reliable. More importantly, they offer customer support to assist you.
Step 1Set up Android Studio Emulator to Download O'Reilly eBooks
Android Studio can serve as an excellent emulator for working with Epubor OR Converter to download O'Reilly eBooks.
Open APKPure within the Android Emulator, search for O'Reilly, and click Install to begin the process.
Once installed, swipe up on the virtual device screen to locate the O'Reilly app icon and tap it to launch it.
Enter your O'Reilly account credentials to log in. Navigate to your playlists, select the book cover to open the download page, and tap the "Download Book" button to begin the download.
Step 2Download and Install O'Reilly DRM Removal
Epubor OR Converter is a highly specialized tool designed for users who want to download their O'Reilly eBooks and convert them to EPUB format with ease.
Step 3Remove DRM from O'Reilly eBooks and Save Them as EPUB
Run the Epubor OR Converter app, and it will automatically start fetching your downloaded O'Reilly eBooks, syncing them within the software interface. Then, drag and drop your O'Reilly eBooks to the main interface of the software and click 'Start Conversion' to remove DRM from the O'Reilly eBooks and convert them to EPUB.
After conversion, you can click the 'Open' button at the top of the software to access all the generated EPUB files of your O'Reilly Safari books.
3. Comparing GitHub Tool with Epubor OR Converter
Features | GitHub Tool | Epubor OR Converter |
---|---|---|
User Tech Background | For tech-savvy users | Not required |
Ease of Use | Difficult to complete the task | Very easy, user-friendly |
Cost | Free | Paid software |
Customer Support | Community & basic support | Responsive |
Batch Conversion | Not available | Yes, supports batch |
Timely Updates | No | Yes, always make sure software can work |
To sum up, GitHub's free tool caters to tech-savvy developers, whereas Epubor is user-friendly, cost-effective for downloading O'Reilly eBooks as EPUBs, and offers batch conversion capabilities.

Amy Lopez crafts informative articles on eBooks and eReaders, uncovering optimal methods to enhance your eBook reading experience, and eagerly shares her findings with you.