Open anarcat opened 1 year ago
see also example URL in #11710
medianet-content
in the URL content.It's there but in the hydration JSON (which has nothing useful for l'agent Jean) and here:
...<div data-mediainfo='{"appCode":"medianet","mediaId":"8802204"}'>...
The OHdio pages are basically similar to the previous ones, but the hydration JSON assigned to _rcState_
has to be analyzed; actual A/V pages have a Medianet ID stashed as mediaId
. There isn't an obvious way to distinguish playlists: it seems that matching xxx/nnn in the url where xxx is one of livres-audio
, balados
, episodes
or emissions
and the path finishes with the hyphenated program slug, like enquete-de-crime-une-histoire-presque-vraie
, finds the obvious ones; then the playlist item URLS (etc) can be found in an items
list in the hydration JSON.
DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE
Checklist
Region
Canada
Example URLs
Single video: https://ici.radio-canada.ca/jeunesse/scolaire/emissions/5615/lagent-jean/episodes/668947/farine-agatha-invention-galaxie/emission
Video Playlist: https://ici.radio-canada.ca/jeunesse/scolaire/emissions/5615/lagent-jean/contenu/tout
Single audio: https://ici.radio-canada.ca/jeunesse/scolaire/emissions/5615/lagent-jean/episodes/450998/science-fiction-jeunesse-enfants-livre/7228/audios
Audio playlist: https://ici.radio-canada.ca/jeunesse/scolaire/emissions/5615/lagent-jean/contenu/audios
Provide a description that is worded well enough to be understood
radio-canada used to provide actual RSS feeds for their shows, but switched to using a rather idiotic OHdio thing that is both an app and a website. Confusingly, other things are still available outside of that site.
The above URLs give an example of videos that are available outside of OHdio, but presumably some work could be done to support OHdio-only sites as well. I have also provided an example of an audio track that I've actually been able to download myself, after much head banging and hair-splitting. That is, of course, after a friend told me "oh you should just write a yt-dlp extractor" and I found out (much too late) about this documentation and the plugin stuff.
In any case, what i did is this rather nasty shell script:
Basically the trick is that you can enumerate the audio tracks from the "playlist" URL above, then from there you need to find and load a small JSON blob that gives you the unique ID for a HLS stream that yt-dlp is then quite happy to slurp down. It's missing author/title/genre kind of metadata in the mp4 and doesn't pull the covers, but that would probably be easier to implement in yt-dlp than going any further ahead in that horrible script.
Provide verbose output that clearly demonstrates the problem
yt-dlp -vU <your command line>
)'verbose': True
toYoutubeDL
params instead[debug] Command-line config
) and insert it belowComplete Verbose Output