Mycroft Community Forum

AMZN Music Skill - testing and feedback

I will try to continue the skill and implement the 2FA, but I wont get it before end of January.

Thanks for any help on this.

Since a few weeks I got a Prime Music subscription but the skill no longer works (at least for my EU account). Besides the fact the API endpoint names (URLs) changed, it looks like there were some changes by Amazon in order to actively prevent “automated logins” (at least I found some comments on Stackoverflow that hint to that).

My next try will be using some “headless browser engine”, but there are only a few that support Javascript (which is heavily used by Amazon), e.g. PhantomJS

Okay, I’m familiar with Python and JS, but not with Amazon Implementations. It sounds like it is a little more work to Do?

A little success … but still way to go:
I can now logon with my EU/DE account to Amazon-Music website by a Python script using Selenium&PhantomJS. The configuration data of the returning web site says "isBot":false

The script passes email and password and detects the code prompt that is required once when a new computer/device is detected.
Note: I don’t have two-factor-authentication enabled for my account.

Next headache: the Amazonmusic library uses Python-requests - how to pass session data from/to Selenium. Google “selenium requests” gives a possible remedy: selenium-requests :laughing:

UPDATE: the authentication issue is solved - once you have successfully logged in and entered the confirmation code a cookie is set and used by succeeding session.

Next: it seems there were some changes to the API that provides the actual streaming URL for a track.
… some time later …
Oh no! Amazon introduced Digital Rights Management (DRM) which complicates playing streams a lot, a very lot. :open_mouth:
I am tracking (german) kodinerds.net forum where some brave developers seem to be working on the problem., but I have no idea if there will be a solution soon… :neutral_face:

1 Like