Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[audible] Add new extractor #22293

Closed
wants to merge 4 commits into from

Conversation

triple-j
Copy link
Contributor

@triple-j triple-j commented Sep 2, 2019

Please follow the guide below

  • You will be asked some questions, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your pull request (like that [x])
  • Use Preview tab to see how your pull request will actually look like

Before submitting a pull request make sure you have:

In order to be accepted and merged into youtube-dl each piece of code must be in public domain or released under Unlicense. Check one of the following options:

  • I am the original author of this code and I am willing to release it under Unlicense
  • I am not the original author of this code but it is in public domain or released under Unlicense (provide reliable evidence)

What is the purpose of your pull request?

  • Bug fix
  • Improvement
  • New extractor
  • New feature

Description of your pull request and other information

This pull request adds support for Audible.com, which is a store where audiobooks can be purchased. This code will download an HLS stream used by Audible's web based Cloud Player. This code also allows the download of a user's entire library of audiobooks via a playlist (AudibleLibraryIE). When not logged in the code can only scrape limited data (title, author, performer, series, description) about an audiobook as well as download an audio sample, but when logged in more data (performance type, categories, release date, etc.) is available as well as the full audiobooks.

I was unable to automate the login process (I was stopped by a CAPTCHA), so one must login via a browser and export one's cookies to gain access. I've tested the cookie method (via the --cookies argument) both with an old Audible account and new Amazon account, both work.

I also added an HTML-to-markdown converter. My reasoning is that some audiobooks, like When Will Jesus Bring the Pork Chops? By: George Carlin, have complicated descriptions with unordered lists, multiple headings, and text emphasis. I wanted to keep as much of the formatting as possible as well as allowing the description to still be readable as plain text.

The modification to _extract_akamai_formats was to prevent the F4M failure warning when extracting the HLS data. I used _extract_wowza_formats as inspiration for the change.

@dstftw
Copy link
Collaborator

dstftw commented Sep 4, 2019

  1. You must provide account credentials.
  2. Read coding conventions.
  3. Metadata should be in plain text, no html or markdown.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defunct PR source branch is not accessible pending-fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants