Support for collections #7
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Some programs are organized in playlists. For instance a documentary split into few episodes.
For example: https://www.arte.tv/fr/videos/RC-020741/corpus-christi/
We propose to handle such playlist by allowing to download all episodes sequentially.
If we query the config API with the playlist identifier (
RC-020741), theConfigPlayerobject returned is the one of the first "episode" of the list.The program identifier (in
.data.attributes.metadata.providerId) in then different than our playlist identifier.This is our clue to understand that the program page URL is in fact a playlist page URL.
There is a playlist API entry point, in our example:
https://api.arte.tv/api/player/v2/playlist/fr/RC-020741The response contains reference to every episode of the list in order... So there is a way.
well, not always it seems.
https://api.arte.tv/api/player/v2/playlist/fr/RC-021792...has an empty
data.attributes.metadata.itemsIf needed, another topic related playlist stream:
yep, that is because for now, one way to validate the
ConfigPlayerobject sent by the API is to veryfy it's.data.attributes.metadata.providerIdis in fact the program identifier from the url (RC-023064in your case) which is not the case for playlist urls.It is indeed, I guess, one way to programatically figure out that the user intend to grab a whole playlist and not just one episode.
It seems there is some sort of linking between episodes that can be followed using a
playlistAPI call with and episode identifier.So far:
itemsof thePlaylistAPI object is not reliable,ConfigPlayerandPlaylist) for each item.An other aproach could be to actually load the HTML page and do some digging. From the look of it the site uses nextjs and include some JSON data that is used to build the HTML page. In that JSON we have everything we ask for (I checked).
The downsideis: relying on HTML implementation is likely less robust than just using their JSON-API, to say it otherwise: a change in thei WEB infra would kill our script.
I am torned.
Support for playliststo Support for collections