-
Notifications
You must be signed in to change notification settings - Fork 9.9k
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
maoritelevision.com (appears to use brightcove) #24552
Comments
* https://github.com/ytdl-org/youtube-dl: [maoritv] Add new extractor(closes ytdl-org#24552)
Hi, The site maoritelevision.com has been updated to maoriplus.co.nz. However URL schemes appear to be the same. I was able to use the help here: 4fb25ff And use the same brightcove URL with the Maoriplus ID at the end. Hopefully an easy fix. Thanks! |
Generally, please open a new issue rather than necroposting in a closed issue. But as you suggest, this may be an easy fix. Show URLs from the old domain redirect to https://www.maoriplus.co.nz/ (sample of 1), so we can bin the processing for those URLs. This current show https://www.maoriplus.co.nz/show/code-the-reunion/play/6349856999112 plays in the browser from the UK with no account/cookies. So now the extractor has the show's Brightcove ID in the URL that previously had to be extracted from the page, very simple: ...
- _VALID_URL = r'https?://(?:www\.)?maoritelevision\.com/shows/(?:[^/]+/)+(?P<id>[^/?&#]+)'
+ _VALID_URL = r'https?://(?:www\.)?maoriplus\.co\.nz/show/(?P<series>[\w-]+)/play/(?P<id>[\d]+)'
...
def _real_extract(self, url):
- display_id = self._match_id(url)
- webpage = self._download_webpage(url, display_id)
- brightcove_id = self._search_regex(
- r'data-main-video-id=["\'](\d+)', webpage, 'brightcove id')
+ brightcove_id = self._match_id(url)
return self.url_result(
self.BRIGHTCOVE_URL_TEMPLATE % brightcove_id,
'BrightcoveNew', brightcove_id) Then:
The show page as seen by yt-dl (with no JS) is essentially empty, so it's lucky that the ID is handed to us. With JS enabled in the browser, the page actually fetches JSON containing the Brightcove data (along with some data for other video hosts), but it happens to be the same as hard-coded in the old extractor's There is also some schema of seasons/episodes/playlists, etc, that someone who cared could implement. |
Checklist
Example URLs
Description
A username+password is needed; the following will work:
username=rf-mtv-test@live555.com,password=testtest
The text was updated successfully, but these errors were encountered: