mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2025-08-22 14:24:03 -07:00
[StreamsbIE] revert base_url to regex
This commit is contained in:
parent
0cef9940a0
commit
c727b4c702
1 changed files with 1 additions and 3 deletions
|
@ -3,8 +3,6 @@ from __future__ import unicode_literals
|
|||
|
||||
from .common import InfoExtractor
|
||||
|
||||
from ..utils import base_url
|
||||
|
||||
|
||||
class KommunetvIE(InfoExtractor):
|
||||
_VALID_URL = r'https://(\w+).kommunetv.no/archive/(?P<id>\w+)'
|
||||
|
@ -26,7 +24,7 @@ class KommunetvIE(InfoExtractor):
|
|||
data = self._download_json('https://oslo.kommunetv.no/api/streams?streamType=1&id=%s' % video_id, video_id, headers=headers)
|
||||
title = data['stream']['title']
|
||||
file = data['playlist'][0]['playlist'][0]['file']
|
||||
url = base_url(file)
|
||||
url = self._search_regex(r'(^[^\?]*)', file, 'url')
|
||||
formats = self._extract_m3u8_formats(url, video_id, ext='mp4', entry_protocol='m3u8_native', m3u8_id='hls', fatal=False)
|
||||
self._sort_formats(formats)
|
||||
return {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue