mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-12-01 10:47:30 +01:00
parent
df63cafe49
commit
a373befa25
@ -60,8 +60,8 @@ def get_clean_field(key):
|
|||||||
if is_video:
|
if is_video:
|
||||||
info.update({
|
info.update({
|
||||||
'_type': 'url_transparent',
|
'_type': 'url_transparent',
|
||||||
'ie_key': 'Ooyala',
|
'ie_key': 'Piksel',
|
||||||
'url': 'ooyala:' + episode['vod_id'],
|
'url': 'https://player.piksel.com/v/refid/nhkworld/prefid/' + episode['vod_id'],
|
||||||
})
|
})
|
||||||
else:
|
else:
|
||||||
audio = episode['audio']
|
audio = episode['audio']
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
|
|
||||||
class PikselIE(InfoExtractor):
|
class PikselIE(InfoExtractor):
|
||||||
_VALID_URL = r'https?://player\.piksel\.com/v/(?P<id>[a-z0-9]+)'
|
_VALID_URL = r'https?://player\.piksel\.com/v/(?:refid/[^/]+/prefid/)?(?P<id>[a-z0-9_]+)'
|
||||||
_TESTS = [
|
_TESTS = [
|
||||||
{
|
{
|
||||||
'url': 'http://player.piksel.com/v/ums2867l',
|
'url': 'http://player.piksel.com/v/ums2867l',
|
||||||
@ -40,6 +40,11 @@ class PikselIE(InfoExtractor):
|
|||||||
'timestamp': 1486171129,
|
'timestamp': 1486171129,
|
||||||
'upload_date': '20170204'
|
'upload_date': '20170204'
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
# https://www3.nhk.or.jp/nhkworld/en/ondemand/video/2019240/
|
||||||
|
'url': 'http://player.piksel.com/v/refid/nhkworld/prefid/nw_vod_v_en_2019_240_20190823233000_02_1566873477',
|
||||||
|
'only_matching': True,
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -52,8 +57,11 @@ def _extract_url(webpage):
|
|||||||
return mobj.group('url')
|
return mobj.group('url')
|
||||||
|
|
||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
video_id = self._match_id(url)
|
display_id = self._match_id(url)
|
||||||
webpage = self._download_webpage(url, video_id)
|
webpage = self._download_webpage(url, display_id)
|
||||||
|
video_id = self._search_regex(
|
||||||
|
r'data-de-program-uuid=[\'"]([a-z0-9]+)',
|
||||||
|
webpage, 'program uuid', default=display_id)
|
||||||
app_token = self._search_regex([
|
app_token = self._search_regex([
|
||||||
r'clientAPI\s*:\s*"([^"]+)"',
|
r'clientAPI\s*:\s*"([^"]+)"',
|
||||||
r'data-de-api-key\s*=\s*"([^"]+)"'
|
r'data-de-api-key\s*=\s*"([^"]+)"'
|
||||||
|
Loading…
Reference in New Issue
Block a user