A script to scrape Reigokai Translations and generate EPUB/PDF eBooks.
Project description
WordPress Scraper & Ebook Generator 📚
A powerful Python script to scrape all posts from a specific WordPress category, bypass Cloudflare protection, and compile everything into a clean, offline-readable EPUB and PDF.
Perfect for archiving your favorite web novel, blog series, or serialized story (like "Living SAFELY") for offline reading on your Kindle, tablet, or phone.
✨ Features
- WordPress API Scraper: Fetches all posts from a specific category ID
- Cloudflare Bypass: Uses a
CF_CLEARANCEcookie to access protected sites - Incremental Fetching: Saves posts to a local JSON file
- Multi-Format Ebook Generation:
EPUB: A clean, Kindle-friendly file with a navigable table of contentsPDF: A universally readable document for any device
- Smart & Configurable: Easily set the target category ID, output names, and posts-per-page
- Clean Output: Uses
BeautifulSoupto parse and clean HTML
🛠️ Prerequisites
Before you begin, you will need:
- Python 3.8+
- Git (to clone this repository)
- A valid
CF_CLEARANCEcookie from the target website
Getting the CF_CLEARANCE Cookie
- Open your web browser
- Go to the target website
- Open Developer Tools (
F12orCtrl+Shift+I) - Click on the "Network" tab
- Refresh the page
- Click on the first request
- Go to "Headers" tab under "Request Headers"
- Find and copy the
cf_clearancecookie value
🚀 Installation & Setup
1. Clone Repository
git clone https://github.com/yourusername/living-safely-scraper.git
cd living-safely-scraper
2. Install Dependencies
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
3. Configure
Create .env file:
CF_CLEARANCE=your_cookie_value_here
4. Run
python scraper.py
📂 Output Structure
reigakou-scraper-scraper/
├── Your_book_ebook/
│ ├── Your_book.epub
│ └── Your_book.pdf
├── Your_book_api.json
├── Your_book_posts.json
├── scraper.py
├── requirements.txt
├── .env
└── README.md
⚠️ Disclaimer: Use responsibly. For personal archiving only. Cookie expires periodically.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file reigokai_scraper-1.0.2.tar.gz.
File metadata
- Download URL: reigokai_scraper-1.0.2.tar.gz
- Upload date:
- Size: 18.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
77ab92913a4a0e685bd7c31b7ebf04064201c946c5377146a5eefa3b52702206
|
|
| MD5 |
986f90fd6aaa6197fd164a71a12d95f3
|
|
| BLAKE2b-256 |
d5690670c1f4ec5f0c62d41fe7853ade2e7a1d3e2a2d0495d9eba74dbb8dca35
|
File details
Details for the file reigokai_scraper-1.0.2-py3-none-any.whl.
File metadata
- Download URL: reigokai_scraper-1.0.2-py3-none-any.whl
- Upload date:
- Size: 19.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b3cf9973f07934e89eb122c310d33b2b97bbd265b45130dcf2667d8ab84f8984
|
|
| MD5 |
a42f1f51e2b28c313ef76af06dd4092a
|
|
| BLAKE2b-256 |
5ce2179ce63dbb04c30eedf51ac28836027b79c76f23ed0c494cbe9817361106
|