mirror of
https://github.com/l1ving/youtube-dl
synced 2025-03-09 10:10:00 +08:00
Using another variable name for specific playlist/format urls
This commit is contained in:
parent
5333bea24f
commit
9d1e43453a
@ -16,10 +16,10 @@ class TV5UnisCaIE(InfoExtractor):
|
|||||||
_TESTS = []
|
_TESTS = []
|
||||||
_GEO_BYPASS = False
|
_GEO_BYPASS = False
|
||||||
|
|
||||||
def _real_extract(self, format_url):
|
def _real_extract(self, url):
|
||||||
|
|
||||||
display_id = self._match_id(format_url)
|
display_id = self._match_id(url)
|
||||||
webpage = self._download_webpage(format_url, display_id)
|
webpage = self._download_webpage(url, display_id)
|
||||||
|
|
||||||
next_data_dict = self._parse_json(
|
next_data_dict = self._parse_json(
|
||||||
get_element_by_id('__NEXT_DATA__', webpage), display_id)\
|
get_element_by_id('__NEXT_DATA__', webpage), display_id)\
|
||||||
@ -32,16 +32,16 @@ class TV5UnisCaIE(InfoExtractor):
|
|||||||
|
|
||||||
formats = []
|
formats = []
|
||||||
for key in filter(lambda k: re.match(r'\$Video:\d+\.encodings\.', k), next_data_dict.keys()):
|
for key in filter(lambda k: re.match(r'\$Video:\d+\.encodings\.', k), next_data_dict.keys()):
|
||||||
format_ul = next_data_dict[key].get('url')
|
url = next_data_dict[key].get('url')
|
||||||
if not format_ul:
|
if not url:
|
||||||
continue
|
continue
|
||||||
if format_ul.endswith('.m3u8'):
|
if url.endswith('.m3u8'):
|
||||||
formats.extend(self._extract_m3u8_formats(format_ul, display_id))
|
formats.extend(self._extract_m3u8_formats(url, display_id))
|
||||||
if format_ul.endswith('.ism/manifest'):
|
if url.endswith('.ism/manifest'):
|
||||||
formats.extend(self._extract_ism_formats(format_ul, display_id, ism_id='mss', fatal=False))
|
formats.extend(self._extract_ism_formats(url, display_id, ism_id='mss', fatal=False))
|
||||||
if format_ul.endswith('.mp4'):
|
if url.endswith('.mp4'):
|
||||||
formats.append({
|
formats.append({
|
||||||
'url': format_ul,
|
'url': url,
|
||||||
'format_id': 'http'
|
'format_id': 'http'
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user