Open mrmidlmv opened 11 months ago
So when the ancient Norwegians used to visit neighbouring countries and didn't get the respect they expected, or anyway, they were prone to slice open the guy's chest and spread his lungs out in what they saw as the form of an eagle. The developers of these sites deserve similar treatment: it's almost as if they're trying to hide local government business from the voters. I think the way to handle these pages in yt-dl is:
InnlandetFylkeIE
to match URLs like the "embed version", extract the ID (5e19lmwj
) and redirect to the equivalent "host domain" URL (where we hope there will be some metadata, because there's nothing useful in the original page)CompanyCastIE
to match URLs like the "host domain" URL and then somehow find the media links and metadata which are also not in this page, apart from the <title>
f'https://companycast.live/player/{video_id}/join'
, which redirects in this case to https://companycast.live/player/5e19lmwj/?SID=...
, where everything is revealed!To start with there are some useful HTML meta elements. But later in the JS we have var app = {...}
where the data
member of app
is an extensive JSON object containing the vod_m3u8
and a lot of metadata, including chapters and participants. The info.json as mentioned (in this case https://cdn.companycast.live/http/companycast.live/player/5e19lmwj/info.json) is also listed, as dataUrl
, but its content repeats the other members of the data
object.
So finally, return an info_dict
with the formats and metadata extracted from the data
object.
Checklist
Example URLs
Description
WRITE DESCRIPTION HERE
This website is from the goverment region Innlandet in Norway and used for distribution of political meetings. The content is not under copyright and does not require login credentials.
The videos are hosted with CompanyCast. The videoes are embedded on the website. When going to the parent level and copying the url from clipboard the domain host link is given. At this time youtube-dl errors with "Unsupported URL"
The direct videolink is given in the info.json file under "vod_m3u8". For the example video. The link is given as: \/\/cdn.companycast.live\/https\/companycast.live\/files\/priv\/videos\/133126\/edited-2023-10-26_07-22-03.mp4\/index.m3u8.