Coder Social home page Coder Social logo

weread-exporter's Introduction

微信读书导出工具

实现原理

通过Hook Web页面中的Canvas函数,获取绘制到Canvas中的文本及样式等信息,转换成markdown格式,保存到本地文件,然后再转换成最终的epub或pdf格式,而mobi格式则是使用kindlegen工具从epub格式转换来的。

INSTALL

$ pip3 install -e .

USAGE

$ python -m weread_exporter -b $book_id -o epub -o pdf

获取书籍ID的方法:在页面https://weread.qq.com/搜索目标书籍,进入到书籍介绍页,URL格式为:https://weread.qq.com/web/bookDetail/08232ac0720befa90825d88,这里的08232ac0720befa90825d88就是书籍ID。

-o参数用于指定要保存的文件格式,目前支持的格式有:epubpdfmobi,生成的文件在当前目录下的output目录中。

epub格式适合手机端访问,pdf格式适合电脑端访问,mobi格式适合kindle访问。

命令行还支持一个可选参数--force-login,默认为False,指定该参数时,会先进行登录操作。

免责申明

本工具仅作技术研究之用,请勿用于商业或违法用途,由于使用该工具导致的侵权或其它问题,该本工具不承担任何责任!

weread-exporter's People

Contributors

drunkdream avatar fengshenx avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.