Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

audiobooker

Search and stream free audiobooks from multiple web sources. It gives one API regardless of where the book comes from, with parallel search, fuzzy scoring, a unified AudioBook dataclass, a local cache, a SQLite index, and a mediavocab Release converter.

Install

pip install audiobooker

# Optional extras
pip install audiobooker[youtube]   # YouTube channel/playlist sources (tutubo)
pip install audiobooker[stealth]   # curl_cffi TLS-fingerprint transport
pip install audiobooker[test]      # pytest + vcrpy (dev only)

Quick start

from audiobooker import search

for book in search("Lovecraft", max_per_source=5, timeout=30):
    print(f"[{book.score:.2f}] [{book.source}] {book.title}")
    print(f"  authors={[f'{a.first_name} {a.last_name}'.strip() for a in book.authors]}")
    print(f"  streams={len(book.streams)}")

Supported sources

Source Site Catalogue Native search
Librivox librivox.org ~18 000 books REST API (title, author, narrator, tag)
LoyalBooks loyalbooks.com ~3 500 books sitemap + genre pages
GoldenAudioBooks goldenaudiobook.co ~6 500 books linear scan
StephenKingAudioBooks stephenkingaudiobooks.com ~113 books native site search
AudioAnarchy audioanarchy.org ~11 books linear scan
DarkerProjects darkerprojects.com ~244 episodes linear scan
HPTalesAudioBooks hpaudiotales.com ~20 books linear scan

YouTube (pip install audiobooker[youtube]):

Source Channel Content
TheCybrarian @TheCybrarian Robert E. Howard fiction
HorrorBabble @HorrorBabble Horror short fiction

Python API

from audiobooker import (
    search, search_by_title, search_by_author, search_by_tag, search_by_narrator,
    audiobook_to_release,
    BookIndex, IndexedSource,
    AudioBook, BookAuthor, AudiobookNarrator, AudioBookChapter,
)

# Targeted searches, all run in parallel across all sources
for book in search_by_author("Dickens", max_per_source=5):
    print(book.title)

for book in search_by_tag("horror", max_per_source=5):
    print(book.title)

Per-source

from audiobooker.scrappers.librivox import Librivox

lv = Librivox()
for book in lv.search_by_title("Dracula"):
    print(book.title, book.runtime)

for book in lv.iterate_all():   # full catalogue
    print(book.title)

All scrapers share the same interface: search(), search_by_title(), search_by_author(), search_by_tag(), search_by_narrator(), iterate_all(), iterate_popular(), iterate_by_author(), iterate_by_tag().

mediavocab integration

mediavocab is a required dependency. audiobook_to_release() projects an AudioBook into the typed mediavocab.Release schema: Work, credits, chapters, external IDs, codec, license.

from audiobooker import search, audiobook_to_release

for book in search("Lovecraft", max_per_source=3):
    release = audiobook_to_release(book)
    lic = release.license
    if lic and lic.is_open():
        print(release.work.title, lic.identifier)

See docs/converters.md for the full field mapping.

HTTP transport

By default every scraper uses a requests.Session with a randomised User-Agent. Two ways to override:

Environment variable, set before any import:

AUDIOBOOKER_TRANSPORT=curl_cffi python myscript.py

Falls back to plain requests if curl_cffi is not installed. Install with pip install audiobooker[stealth].

Per-instance injection, pass any requests-compatible session:

from curl_cffi import requests as cffi_requests
from audiobooker.scrappers.librivox import Librivox

session = cffi_requests.Session(impersonate="chrome")
lv = Librivox(session=session)

default_session() from audiobooker.transport respects AUDIOBOOKER_TRANSPORT and returns the matching session type (audiobooker/transport.py:1).

Local index

Build once, search without network access:

from audiobooker.index import BookIndex

idx = BookIndex()   # ~/.audiobooker/index.db
idx.build()         # iterate_all() on all 7 web sources

for book in idx.search_by_title("Sherlock Holmes", max_results=5):
    print(f"[{book.score:.2f}] {book.title}")

CLI reference

audiobooker search <query>
    --method  search|search_by_title|search_by_author|search_by_tag|search_by_narrator
    -n        max results (default 10)
    --source  limit to one source
    --timeout seconds (default 30)
    -v        verbose (tags, narrator, stream URLs)

audiobooker index build [--sources librivox loyalbooks ...]
audiobooker index update
audiobooker index search <query> [--method ...] [-n N]
audiobooker index stats
audiobooker index follow <url> [--kind channel|playlist] [--tags ...] [--blacklist ...]
audiobooker index unfollow <url>
audiobooker index list

audiobooker cache download <query> [--stream INDEX]
audiobooker cache play     <query> [--stream INDEX]
audiobooker cache list
audiobooker cache clear    [<query>]
audiobooker cache info     <query>

All index and cache commands accept --db PATH and --cache-dir PATH to override default locations (~/.audiobooker/index.db and ~/.cache/audiobooker).

Docs

Full documentation is in /docs/:

Runnable examples are in /examples/, numbered 01 to 10 from quickstart to advanced index usage.

Error handling

Network failures and malformed pages are swallowed per-item. A bad page never aborts an iterate_all() run. If a source site is down or has restructured its HTML, that scraper yields nothing without raising an error.

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

audiobooker-0.9.0a3.tar.gz (65.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

audiobooker-0.9.0a3-py3-none-any.whl (48.5 kB view details)

Uploaded Python 3

File details

Details for the file audiobooker-0.9.0a3.tar.gz.

File metadata

  • Download URL: audiobooker-0.9.0a3.tar.gz
  • Upload date:
  • Size: 65.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for audiobooker-0.9.0a3.tar.gz
Algorithm Hash digest
SHA256 b22cee8a6ee2ccd9f2e595404ff98fb2ee492dd5e18b9f2c4ee152677311b9a8
MD5 19451d64ee5ec8514bf060b69aec955f
BLAKE2b-256 fc74d31ebb443341c328696ade605f659f67d77362b65bf548d9eac855eb8b6d

See more details on using hashes here.

File details

Details for the file audiobooker-0.9.0a3-py3-none-any.whl.

File metadata

  • Download URL: audiobooker-0.9.0a3-py3-none-any.whl
  • Upload date:
  • Size: 48.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for audiobooker-0.9.0a3-py3-none-any.whl
Algorithm Hash digest
SHA256 9f06da995ec927cff9368d250208b50b7b94fcb60ecbc5c2edcfa4827455a12f
MD5 e3b8f21f4b0f2344ef8f1a65db22dc70
BLAKE2b-256 82f95e2df3b044401688d12584ad6f4458930f31e649f9c76d0242107adfc801

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.9.0a3 This release

2 files

0.7.0

2 files

0.4.0

1 file

0.3.1

1 file

0.3.0

1 file

0.2.7

1 file

0.2.6

1 file

0.2.4

1 file

0.2.1

1 file

0.1.1

1 file

0.1

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page