[theplatform] combine the results of different extraction methods
This commit is contained in:
parent
ddebc0f853
commit
7d5f8e538e
@ -144,11 +144,12 @@ class ThePlatformIE(InfoExtractor):
|
|||||||
head = meta.find(_x('smil:head'))
|
head = meta.find(_x('smil:head'))
|
||||||
body = meta.find(_x('smil:body'))
|
body = meta.find(_x('smil:body'))
|
||||||
|
|
||||||
|
formats = []
|
||||||
node = body.find(_x('smil:seq//smil:video'))
|
node = body.find(_x('smil:seq//smil:video'))
|
||||||
if node is None:
|
if node is None:
|
||||||
node = body.find(_x('smil:seq/smil:video'))
|
node = body.find(_x('smil:seq/smil:video'))
|
||||||
if node is not None and '.m3u8' in node.attrib['src']:
|
if node is not None and '.m3u8' in node.attrib['src']:
|
||||||
formats = self._extract_m3u8_formats(node.attrib['src'], video_id)
|
formats.extend(self._extract_m3u8_formats(node.attrib['src'], video_id))
|
||||||
if node is not None and '.f4m' in node.attrib['src']:
|
if node is not None and '.f4m' in node.attrib['src']:
|
||||||
f4m_url = node.attrib['src']
|
f4m_url = node.attrib['src']
|
||||||
if 'manifest.f4m?' not in f4m_url:
|
if 'manifest.f4m?' not in f4m_url:
|
||||||
@ -156,9 +157,8 @@ class ThePlatformIE(InfoExtractor):
|
|||||||
# the parameters are from syfy.com, other sites may use others,
|
# the parameters are from syfy.com, other sites may use others,
|
||||||
# they also work for nbc.com
|
# they also work for nbc.com
|
||||||
f4m_url += '&g=UXWGVKRWHFSP&hdcore=3.0.3'
|
f4m_url += '&g=UXWGVKRWHFSP&hdcore=3.0.3'
|
||||||
formats = self._extract_f4m_formats(f4m_url, video_id)
|
formats.extend(self._extract_f4m_formats(f4m_url, video_id))
|
||||||
else:
|
else:
|
||||||
formats = []
|
|
||||||
switch = body.find(_x('smil:switch'))
|
switch = body.find(_x('smil:switch'))
|
||||||
if switch is None:
|
if switch is None:
|
||||||
switch = body.find(_x('smil:par//smil:switch'))
|
switch = body.find(_x('smil:par//smil:switch'))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user