lbq110/weread-exporter — explained in plain English
Analysis updated 2026-05-18
Export a book you have access to on WeRead into readable Markdown chapter files.
Reconstruct canvas-rendered text into normal paragraphs using captured character coordinates.
Keep a persistent logged-in WeRead session after scanning a QR code once.
Study how a page renders text via Canvas can be intercepted with a fillText hook.
| lbq110/weread-exporter | murphylmf/unish | riyagoelrs/tiktok-scraper | |
|---|---|---|---|
| Stars | 145 | 145 | 145 |
| Language | Python | Python | Python |
| Setup difficulty | — | hard | — |
| Complexity | — | 5/5 | — |
| Audience | developer | researcher | developer |
Figures from each repo's GitHub metadata at analysis time.
This is a Python tool for exporting full books from WeRead, a Chinese ebook reading platform, and converting them into Markdown files. The web version of WeRead does not display its text as normal selectable webpage text. Instead it draws each character directly onto a Canvas element, which normally makes the content much harder to extract. To work around this, the tool uses Playwright to automate a Chromium browser and keep you logged into your WeRead account after a single QR code scan. Before the page's own code runs, it injects a hook into the browser's Canvas drawing function, so it can intercept every individual character the page tries to draw, along with its screen position. Because WeRead renders both the current page and the next page onto the same canvas at once as a performance trick, the tool detects where the vertical position resets to correctly split the captured characters into separate pages. It then reconstructs full lines and paragraphs from the individual characters based on their x and y coordinates, and cleans up the line breaks introduced by canvas rendering so the result reads as natural paragraphs. To use it, you install Playwright and its Chromium browser, then run the script with either a book's URL or its book ID. You can choose an output folder and optionally skip saving the raw captured canvas coordinate data to save disk space. The first run opens a browser window asking you to scan a QR code to log into your WeRead account, and that login session is then reused for later runs. The output includes a metadata file with the book's title, author, and chapter list, a Markdown file for each chapter, and one combined Markdown file for the whole book. The tool only works for books you already have access to through your account, and some publishers block web reading entirely, showing an app only message instead, which this tool cannot get around. Exporting is fairly slow, taking roughly 20 to 30 seconds per chapter due to page turning delays. The README states the tool is intended only for personal study and research, not for commercial use or wide redistribution, and asks users to respect copyright.
A Python tool that automates a browser to capture WeRead's canvas-drawn book text and exports full books as Markdown.
Mainly Python. The stack also includes Python, Playwright, Chromium.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.