This script downloads books from O'Reilly Learning Platform
#!/bin/bash
# Path to the cookie file
cookie_file="./cookie.json"
# Books IDs
books=(
id_of_book_1
id_of_book_2
id_of_book_3
...
...
id_of_book_n
)
# Loop through the books and download them
for book_id in "${books[@]}"; do
title=$(curl "https://learning.oreilly.com/api/v2/search/?query=archive_books_id:${book_id}" |
jq -r '.results[0].title')
(<${cookie_file} docker run -i kirinnee/orly:latest sso "${book_id}") >"${title}.epub"
done
This script downloads books from O'Reilly Learning Platform