mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-16 01:25:06 +00:00
parent
efbed08dc2
commit
882c699296
1 changed files with 4 additions and 5 deletions
|
@ -1,7 +1,7 @@
|
||||||
# coding: utf-8
|
# coding: utf-8
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import json
|
import re
|
||||||
|
|
||||||
from .common import InfoExtractor
|
from .common import InfoExtractor
|
||||||
from ..utils import ExtractorError
|
from ..utils import ExtractorError
|
||||||
|
@ -27,10 +27,9 @@ def _real_extract(self, url):
|
||||||
if not streams_url.startswith('http://'):
|
if not streams_url.startswith('http://'):
|
||||||
streams_url = compat_urlparse.urljoin(url, streams_url)
|
streams_url = compat_urlparse.urljoin(url, streams_url)
|
||||||
|
|
||||||
stream_data = self._download_webpage(
|
streams = self._download_json(
|
||||||
streams_url, content_id, note='Downloading stream data')
|
streams_url, content_id, note='Downloading stream data',
|
||||||
streams = json.loads(self._search_regex(
|
transform_source=lambda s: re.sub(r'^\s*\((.*)\);\s*$', r'\1', s))['Streams']
|
||||||
r'\((.*)\);', stream_data, 'stream info'))['Streams']
|
|
||||||
|
|
||||||
is_live = None
|
is_live = None
|
||||||
formats = []
|
formats = []
|
||||||
|
|
Loading…
Reference in a new issue