mirror of
https://github.com/mkb79/audible-cli.git
synced 2025-06-28 09:14:02 -04:00
# Added - `--aax-fallback` option to `download` command to download books in aax format and fallback to aaxc, if the book is not available as aax - `--annotation` option to `download` command to get bookmarks and notes - `questionary` package to dependencies - `add` and `remove` subcommands to wishlist - `full_response_callback` to `utils` - `export_to_csv` to `utils` - `run_async` to `decorators` - `pass_client` to `decorators` - `profile_option` to `decorators` - `password_option` to `decorators` - `timeout_option` to `decorators` - `bunch_size_option` to `decorators` - `ConfigFile.get_profile_option` get the value for an option for a given profile - `Session.selected.profile` to get the profile name for the current session - `Session.get_auth_for_profile` to get an auth file for a given profile - `models.BaseItem.create_base_filename` to build a filename in given mode - `models.LibraryItem.get_annotations` to get annotations for a library item # Changed - bump `audible` to v0.8.2 to fix a bug in httpx - rework plugin examples in `plugin_cmds` - rename `config.Config` to `config.ConfigFile` - move `click_verbosity_logger` from `_logging` to `decorators` and rename it to `verbosity_option` - move `wrap_async` from `utils` to `decorators` - move `add_param_to_session` from `config` to `decorators` - move `pass_session` from `config` to `decorators` - `download` command let you now select items when using `--title` option # Fixed - the `library export` and `wishlist export` command will now export to `csv` correctly
19 lines
580 B
Python
19 lines
580 B
Python
import click
|
|
from audible_cli.decorators import pass_client, timeout_option
|
|
|
|
|
|
@click.command("image-urls")
|
|
@click.argument("asin")
|
|
@timeout_option()
|
|
@pass_client()
|
|
async def cli(client, asin):
|
|
"""Print out the image urls for different resolutions for a book"""
|
|
r = await client.get(
|
|
f"catalog/products/{asin}",
|
|
response_groups="media",
|
|
image_sizes=(
|
|
"1215, 408, 360, 882, 315, 570, 252, 558, 900, 500")
|
|
)
|
|
images = r["product"]["product_images"]
|
|
for res, url in images.items():
|
|
click.echo(f"Resolution {res}: {url}")
|