Giter Club home page Giter Club logo

blinkist-m4a-downloader's Introduction

Blinkist M4A Downloader

Build Status GitHub license Version Go Report Card

What is Blinkist.com

  • Listen to key ideas from the world's best non-fiction books in just 15 minutes.

Requirements

Configuration

Enter your username and password in:

  1. blinkist/main.go, lines #16, #17.
  2. download/download.go, lines #17, #18.

Application

  • Run go run main.go inside blinkist/ folder to produce books_urls.txt, the list of unduplicated URLs of all of the books.
  • Run go run download.go inside download/ folder to start downloading audio files from the above URLs. books_urls.txt must be present in the download/ folder!

Technical details of the solution

  1. Look for HTML tag data-book-id e.g."5c28f2fc6cee070008e7a3d7" in each book URL.

  2. Look for all HTML tags data-chapterNo e.g."1" and corresponding data-chapterId e.g."5c28f3296cee070007b46369" (both on the same line) from each book URL.

  3. Construct this API link to get the short-lived download link: https://www.blinkist.com/api/books/<data-book-id>/chapters/<data-chapterId>/audio. (e.g.https://www.blinkist.com/api/books/5c28f2fc6cee070008e7a3d7/chapters/5c28f3296cee070007b46369/audio).

  4. Read the output for each book chapter, e.g.:

{"url":"https://abcdefgh12345.cloudfront.net/5c28f2fc6cee070008e7a3d7/5c28f3296cee070007b46369.m4a?Expires=1234567890\u0026Signature=abcdefghijklmnopqrstuvwxyz1234-567890abcde-fghi~jklmnopqrstuvwxyz1234567890abcdefgh~jklmnopqrstuvwxyz1234567890abcdefgh-abcd~abcdefghijklmnopqrstuvwxyz1234-567890abcde~jklmnopqrstuvwxyz1234567890abcdefgh-jklmnopqrstuvwxyz1234567890abcdefgh-567890abcde__\u0026Key-Pair-Id=ABCDEFGHIJKLMNOPQRST"}
  1. If the book contains audio (the previous step returns something), create a folder based on JavaScript tag e.g."reader:book:title:changed", "Bad Blood" on the local drive.

  2. Decode to proper URL, (replace \u0026 with &), e.g.: https://abcdefgh12345.cloudfront.net/5c28f2fc6cee070008e7a3d7/5c28f3296cee070007b46369.m4a?Expires=1234567890&Signature=abcdefghijklmnopqrstuvwxyz1234-567890abcde-fghi~jklmnopqrstuvwxyz1234567890abcdefgh~jklmnopqrstuvwxyz1234567890abcdefgh-abcd~abcdefghijklmnopqrstuvwxyz1234-567890abcde~jklmnopqrstuvwxyz1234567890abcdefgh-jklmnopqrstuvwxyz1234567890abcdefgh-567890abcde__&Key-Pair-Id=ABCDEFGHIJKLMNOPQRST

  3. Download the chapter using the above link as the m4a file. Filename will be based on data-chapterNo and stored in the book title folder, e.g.: Bad Blood/000.m4a, Bad Blood/001.m4a, Bad Blood/002.m4a,... .

Stats

Item Size
Categories 27
Books 1,771
Books with Audio 1,576
Books missing Audio 195
No. of m4a files 14,646
All files size 26,473,732,000 B (25.2GB)

blinkist-m4a-downloader's People

Contributors

luckylittle avatar

Watchers

James Cloos 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.