mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-11-25 11:41:52 +00:00
[itv] Fix production id extraction (closes #13671)
This commit is contained in:
parent
935d6c20c0
commit
71dde5eecf
1 changed files with 7 additions and 1 deletions
|
@ -59,12 +59,18 @@ class ITVIE(InfoExtractor):
|
||||||
def _add_sub_element(element, name):
|
def _add_sub_element(element, name):
|
||||||
return etree.SubElement(element, _add_ns(name))
|
return etree.SubElement(element, _add_ns(name))
|
||||||
|
|
||||||
|
production_id = (
|
||||||
|
params.get('data-video-autoplay-id') or
|
||||||
|
'%s#001' % (
|
||||||
|
params.get('data-video-episode-id') or
|
||||||
|
video_id.replace('a', '/')))
|
||||||
|
|
||||||
req_env = etree.Element(_add_ns('soapenv:Envelope'))
|
req_env = etree.Element(_add_ns('soapenv:Envelope'))
|
||||||
_add_sub_element(req_env, 'soapenv:Header')
|
_add_sub_element(req_env, 'soapenv:Header')
|
||||||
body = _add_sub_element(req_env, 'soapenv:Body')
|
body = _add_sub_element(req_env, 'soapenv:Body')
|
||||||
get_playlist = _add_sub_element(body, ('tem:GetPlaylist'))
|
get_playlist = _add_sub_element(body, ('tem:GetPlaylist'))
|
||||||
request = _add_sub_element(get_playlist, 'tem:request')
|
request = _add_sub_element(get_playlist, 'tem:request')
|
||||||
_add_sub_element(request, 'itv:ProductionId').text = params['data-video-id']
|
_add_sub_element(request, 'itv:ProductionId').text = production_id
|
||||||
_add_sub_element(request, 'itv:RequestGuid').text = compat_str(uuid.uuid4()).upper()
|
_add_sub_element(request, 'itv:RequestGuid').text = compat_str(uuid.uuid4()).upper()
|
||||||
vodcrid = _add_sub_element(request, 'itv:Vodcrid')
|
vodcrid = _add_sub_element(request, 'itv:Vodcrid')
|
||||||
_add_sub_element(vodcrid, 'com:Id')
|
_add_sub_element(vodcrid, 'com:Id')
|
||||||
|
|
Loading…
Reference in a new issue