1
1
mirror of https://github.com/ytdl-org/youtube-dl synced 2024-11-27 21:46:54 +01:00

Merge branch 'akamai_pv' of https://github.com/remitamine/youtube-dl into remitamine-akamai_pv

This commit is contained in:
Yen Chi Hsuan 2016-04-25 21:02:02 +08:00
commit d6712378e7
No known key found for this signature in database
GPG Key ID: 3FDDD575826C5C30

View File

@ -1006,6 +1006,13 @@ class InfoExtractor(object):
def _parse_f4m_formats(self, manifest, manifest_url, video_id, preference=None, f4m_id=None,
transform_source=lambda s: fix_xml_ampersands(s).strip(),
fatal=True):
# currently youtube-dl cannot decode the playerVerificationChallenge as Akamai uses Adobe Alchemy
akamai_pv = manifest.find('{http://ns.adobe.com/f4m/1.0}pv-2.0')
if akamai_pv is not None and ';' in akamai_pv.text:
playerVerificationChallenge = akamai_pv.text.split(';')[0]
if playerVerificationChallenge.strip() != '':
return []
formats = []
manifest_version = '1.0'
media_nodes = manifest.findall('{http://ns.adobe.com/f4m/1.0}media')