Skip to content

Methods

Rafael edited this page Mar 17, 2020 · 1 revision

This page describes the methods used for retrieving information from the different streaming services.

To successfully scrobble, we need the following information:

  • Item Information (TV Shows): [Series Title, Season Number, [Episode Number or Episode Title]]
  • Item Information (Movies): [Title, Year] or [Title]
  • Scrobble Information: [Play / Pause Status, Progress]

Streaming Services

Amazon Prime

There doesn't seem to be an object in the window object that contains any useful information. However, we can make a request to https://atv-ps.primevideo.com/cdp/catalog/GetPlaybackResources?asin={id}&consumptionType=Streaming&desiredResources=CatalogMetadata&deviceID=21de9f61b9ea631b704325f9bb991dd53891cdebfddeb6c73ce1efad&deviceTypeID=AOAGZA014O5RE&firmware=1&gascEnabled=true&resourceUsage=CacheResources&videoMaterialType=Feature&titleDecorationScheme=primary-content&uxLocale=en_US to retrieve item information. id is available in the DOM.

Scrobble information is retrieved from the DOM.

HBO GO

There's an sdk object in the window object that contains all of the information that we need.

This method should work 99% of the time, but as a fallback method, if we cannot access the sdk object, the information is retrieved from the DOM. In this case, the DOM does not provide Year for movies.

Netflix

There's a netflix object in the window object that contains scrobble information. We can make a request to https://www.netflix.com/api/shakti/{buildIdentifier}/metadata?languages=en-US&movieid={id} to retrieve item information. buildIdentifier is available in the netflix object and id is available in the document URL.

This method should work 99% of the time, but as a fallback method, if we cannot access the netflix object, the information is retrieved from the DOM. In this case, we cannot accurately track the progress, since the progress bar is removed from the DOM after a period of inactivity.

Clone this wiki locally