mirror of
https://codeberg.org/polarisfm/youtube-dl
synced 2025-02-16 17:07:54 +01:00
[Northpoint] Add new extractor
This commit is contained in:
parent
ff2e3e38be
commit
b4746dd629
@ -1,7 +1,6 @@
|
||||
# coding: utf-8
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from .common import InfoExtractor
|
||||
from .theplatform import ThePlatformIE
|
||||
|
||||
|
||||
@ -24,8 +23,7 @@ class NorthpointIE(ThePlatformIE):
|
||||
webpage = self._download_webpage(url, display_id)
|
||||
playerCode = self._search_regex(r'playerCode\s*=\s*[\'"]([^\'"]+)', webpage, 'player Code')
|
||||
seriesPermalink = self._search_regex(r'series_permalink\s*:\s*[\'"]([^\'"]+)', webpage, 'series name')
|
||||
seriesJSON = self._download_json(
|
||||
'http://northpoint.org/api/mma/details/channel/npcc/permalink/%s' %seriesPermalink,display_id)['messages']
|
||||
seriesJSON = self._download_json('http://northpoint.org/api/mma/details/channel/npcc/permalink/%s' % seriesPermalink, display_id)['messages']
|
||||
|
||||
videoIDLink = ''
|
||||
videoIDLinkTemp = ''
|
||||
@ -41,18 +39,14 @@ class NorthpointIE(ThePlatformIE):
|
||||
releaseUrl = self._search_regex(r'tp:releaseUrl\s*=\s*[\'"]([^\'"]+)', linkWebpage, 'release url')
|
||||
platformMetaData = self._search_regex(r'.*.com\/s\/\s*([^\n\r]*)[ˆ?]', releaseUrl, 'release url')
|
||||
theplatform_metadata = self._download_theplatform_metadata(platformMetaData, display_id)
|
||||
# print theplatform_metadata
|
||||
|
||||
video_id = theplatform_metadata['pid']
|
||||
title = theplatform_metadata['title'][19:]
|
||||
series = theplatform_metadata['pl1$seriesName']
|
||||
|
||||
# print title, series
|
||||
|
||||
formats, subtitles = self._extract_theplatform_smil(releaseUrl, video_id)
|
||||
self._sort_formats(formats)
|
||||
|
||||
|
||||
return {
|
||||
'id': video_id,
|
||||
'title': title,
|
||||
|
Loading…
Reference in New Issue
Block a user