[ Foro de Python ]

extraer y ordenar ordereddict

12-Dec-2019 22:50
Invitado (carlos74)
0 Respuestas

¡Hola!
Necesito una ayuda para sacar y ordenar los datos de un ejemplo de Ordereddict:
OrderedDict([('270p_alt2', <HLSStream('https://hlsvod2018a.akamaized.net/resources/TE_GL13/mp4/9/9/1576092573799.mp4/1576092573799-audio=128001-video=428000.m3u8?hls_minimum_fragment_length=6&hls_client_manifest_version=3')>), ('270p_alt', <HLSStream('https://hlsvod2018a-tcdn.rtve.es/resources/TE_GL13/mp4/9/9/1576092573799.mp4/1576092573799-audio=128001-video=428000.m3u8?hls_minimum_fragment_length=6&hls_client_manifest_version=3')>), ('270p', <HLSStream('https://rtve-hlsvod.secure.footprint.net/resources/TE_GL13/mp4/9/9/1576092573799.mp4/1576092573799-audio=128001-video=428000.m3u8?hls_minimum_fragment_length=6&hls_client_manifest_version=3')>), ('360p_alt2', <HLSStream('https://hlsvod2018a.akamaized.net/resources/TE_GL13/mp4/9/4/1576092544849.mp4/1576092544849-audio=128001-video=499000.m3u8?hls_minimum_fragment_length=6&hls_client_manifest_version=3')>), ('360p_alt', <HLSStream('https://hlsvod2018a-tcdn.rtve.es/resources/TE_GL13/mp4/9/4/1576092544849.mp4/1576092544849-audio=128001-video=499000.m3u8?hls_minimum_fragment_length=6&hls_client_manifest_version=3')>), ('360p', <HLSStream('https://rtve-hlsvod.secure.footprint.net/resources/TE_GL13/mp4/9/4/1576092544849.mp4/1576092544849-audio=128001-video=499000.m3u8?hls_minimum_fragment_length=6&hls_client_manifest_version=3')>), ('540p_alt2', <HLSStream('https://hlsvod2018a.akamaized.net/resources/TE_GL13/mp4/9/6/1576092491769.mp4/1576092491769-audio=128001-video=947000.m3u8?hls_minimum_fragment_length=6&hls_client_manifest_version=3')>), ('540p_alt', <HLSStream('https://hlsvod2018a-tcdn.rtve.es/resources/TE_GL13/mp4/9/6/1576092491769.mp4/1576092491769-audio=128001-video=947000.m3u8?hls_minimum_fragment_length=6&hls_client_manifest_version=3')>), ('540p', <HLSStream('https://rtve-hlsvod.secure.footprint.net/resources/TE_GL13/mp4/9/6/1576092491769.mp4/1576092491769-audio=128001-video=947000.m3u8?hls_minimum_fragment_length=6&hls_client_manifest_version=3')>), ('worst', <HLSStream('https://hlsvod2018a.akamaized.net/resources/TE_GL13/mp4/9/9/1576092573799.mp4/1576092573799-audio=128001-video=428000.m3u8?hls_minimum_fragment_length=6&hls_client_manifest_version=3')>), ('best', <HLSStream('https://rtve-hlsvod.secure.footprint.net/resources/TE_GL13/mp4/9/6/1576092491769.mp4/1576092491769-audio=128001-video=947000.m3u8?hls_minimum_fragment_length=6&hls_client_manifest_version=3')>)])
Necesito un código de python para ordenar todos los datos así:
title: 270p_alt2
url: https://hlsvod2018a.akamaized.net/resources/TE_GL13/mp4/9/9/1576092573799.mp4/1576092573799-audio=128001-video=428000.m3u8?hls_minimum_fragment_length=6&hls_client_manifest_version=3




Si ya eres usuario del sistema, puedes contestar desde tu cuenta y así ganar prestigio.

Si sólo eres un visitante, puedes optar por...