ViciousPotato/safaribooks
Sobre
Convert safaribooksonline ebook to epub and Kindle mobi format
Design e mídiaCrescimento medido de estrelas
- em 24 h
- 0
- em 7 dias
- 0
- em 15 dias
- 0
- em 1 mês
- Coletando histórico
Variações líquidas em períodos sobrepostos, não totais diários. Medições ausentes ficam em branco. Estrelas indicam interesse, não qualidade.
README.md
OriginalTHIS PROJECT IS DISCONTINUED, PLEASE CHECKOUT https://github.com/lorenzodifuccia/safaribooks WHICH IS MORE ACTIVELY MAITAINED AND AVAILABLE ON PYPI!
safaribooks
Convert safaribooksonline ebook to epub and Kindle mobi format
Usage
WARNING: use at your own risk.
Installation
If you want Kindle mobi output, download kindlegen from Amazon and put the binary somewhere in PATH.
If you only need epub books this step can be skipped.
Clone the safaribooks repo, let's say to
safaribooks/directory.Make sure you have Python 2 installed (Tested version Python 2.7) then run:
cd safaribookspip install .safaribooks is the folder you checkout the code.
Download a book (run this in the folder you checked out the code).
safaribooks -u USER/EMAIL -p PASSWORD -b BOOK_ID download-epub.
BOOK_ID is the id in url such as 9781617291920 in https://learning.oreilly.com/library/view/real-world-machine-learning/9781617291920/kindle_split_011.html.
An epub and a mobi file will be generated.
Installation with docker
With credit to @jmagnusson
This should work no matter platform you're on as no dependencies other than docker needs to be installed.
Run
docker build -t safaribooks .Run
docker run -it --rm -v $(pwd)/converted:/app/converted safaribooks -u USER/EMAIL -p PASSWORD -b BOOK_ID downloadand wait for it to completeThe .epub and .mobi should now be in the folder
convertedof your current working directory.
Command line usage
usage: safaribooks [-h] [-o OUTPUT_DIRECTORY] [-u USER] [-p PASSWORD] [-c COOKIE]
[-b BOOK_ID]
{download-epub,download,convert-to-mobi} ...
Crawl Safari Books Online book content
positional arguments:
{download-epub,download,convert-to-mobi}
download-epub Download as epub
download Download as epub, and convert to mobi
convert-to-mobi Convert existing epub file to mobi.
optional arguments:
-h, --help show this help message and exit
-o OUTPUT_DIRECTORY, --output-directory OUTPUT_DIRECTORY
Directory where converted files are located / should
be placed
-u USER, --user USER Safari Books Online user / e-mail address
-p PASSWORD, --password PASSWORD
Safari Books Online password
-b BOOK_ID, --book-id BOOK_ID
Safari Books Online book ID
-c COOKIE, --cookie COOKIE
Safari Books Online Cookie. This filed can be retrieved by
using Chrome and copying request as curl. Cookie input should
be included in ''.
Example:
'BrowserCookie=XXXXXXXXXXXXXXXXXXXXX; sessionid=XXXXXXXXXXXXXXXXX;' etc.
Create an issue if you find it does not work!
Explore projetos relacionados
Carregando…