Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for innlandetfylke.no (videohost: CompanyCast) #32656

Open
5 tasks done
mrmidlmv opened this issue Dec 3, 2023 · 1 comment
Open
5 tasks done

Add support for innlandetfylke.no (videohost: CompanyCast) #32656

mrmidlmv opened this issue Dec 3, 2023 · 1 comment
Labels
site-support-request Add extractor(s) for a new domain

Comments

@mrmidlmv
Copy link

mrmidlmv commented Dec 3, 2023

Checklist

  • I'm reporting a new site support request
  • I've verified that I'm running youtube-dl version 2021.12.17
  • I've checked that all provided URLs are alive and playable in a browser
  • I've checked that none of provided URLs violate any copyrights
  • I've searched the bugtracker for similar site support requests including closed ones

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.

@mrmidlmv mrmidlmv added the site-support-request Add extractor(s) for a new domain label Dec 3, 2023
@dirkf
Copy link
Contributor

dirkf commented Dec 3, 2023

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:

  • create an 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)
  • create a 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>
  • "somehow" seems to be to follow 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
site-support-request Add extractor(s) for a new domain
Projects
None yet
Development

No branches or pull requests

2 participants