projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a238a86
)
[nexx] make http format ids more consistent
author
Remita Amine
<remitamine@gmail.com>
Sat, 25 Nov 2017 17:36:31 +0000
(18:36 +0100)
committer
Remita Amine
<remitamine@gmail.com>
Sat, 25 Nov 2017 17:36:31 +0000
(18:36 +0100)
youtube_dl/extractor/nexx.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/nexx.py
b/youtube_dl/extractor/nexx.py
index d79a1ce2831ed91367874a31f77cdda43480a9b6..9203c04777db9d84ab7efad05476878e6687080f 100644
(file)
--- a/
youtube_dl/extractor/nexx.py
+++ b/
youtube_dl/extractor/nexx.py
@@
-198,18
+198,15
@@
class NexxIE(InfoExtractor):
AZURE_URL = 'http://nx%s%02d.akamaized.net/'
AZURE_URL = 'http://nx%s%02d.akamaized.net/'
- def get_cdn_base(cdn, prefix='-p'):
- azure_base = None
+ def get_cdn_shield_base(shield_type='', prefix='-p'):
for secure in ('', 's'):
for secure in ('', 's'):
- cdn_shield = stream_data.get('cdn
%sHTTP%s' % (cdn
, secure.upper()))
+ cdn_shield = stream_data.get('cdn
Shield%sHTTP%s' % (shield_type
, secure.upper()))
if cdn_shield:
if cdn_shield:
- azure_base = 'http%s://%s' % (secure, cdn_shield)
- break
+ return 'http%s://%s' % (secure, cdn_shield)
else:
else:
- azure_base = AZURE_URL % (prefix, int(stream_data['azureAccount'].replace('nexxplayplus', '')))
- return azure_base
+ return AZURE_URL % (prefix, int(stream_data['azureAccount'].replace('nexxplayplus', '')))
- azure_stream_base = get_cdn_
base('Shield'
)
+ azure_stream_base = get_cdn_
shield_base(
)
is_ml = ',' in language
azure_manifest_url = '%s%s/%s_src%s.ism/Manifest' % (
azure_stream_base, azure_locator, video_id, ('_manifest' if is_ml else '')) + '%s'
is_ml = ',' in language
azure_manifest_url = '%s%s/%s_src%s.ism/Manifest' % (
azure_stream_base, azure_locator, video_id, ('_manifest' if is_ml else '')) + '%s'
@@
-229,7
+226,7
@@
class NexxIE(InfoExtractor):
formats.extend(self._extract_ism_formats(
azure_manifest_url % '', video_id, ism_id='%s-mss' % cdn, fatal=False))
formats.extend(self._extract_ism_formats(
azure_manifest_url % '', video_id, ism_id='%s-mss' % cdn, fatal=False))
- azure_progressive_base = get_cdn_
base('Shield
Prog', '-d')
+ azure_progressive_base = get_cdn_
shield_base('
Prog', '-d')
azure_file_distribution = stream_data.get('azureFileDistribution')
if azure_file_distribution:
fds = azure_file_distribution.split(',')
azure_file_distribution = stream_data.get('azureFileDistribution')
if azure_file_distribution:
fds = azure_file_distribution.split(',')
@@
-242,7
+239,7
@@
class NexxIE(InfoExtractor):
f = {
'url': '%s%s/%s_src_%s_%d.mp4' % (
azure_progressive_base, azure_locator, video_id, ss[1], tbr),
f = {
'url': '%s%s/%s_src_%s_%d.mp4' % (
azure_progressive_base, azure_locator, video_id, ss[1], tbr),
- 'format_id': '
http-%d' % tbr
,
+ 'format_id': '
%s-http-%d' % (cdn, tbr)
,
'tbr': tbr,
}
width_height = ss[1].split('x')
'tbr': tbr,
}
width_height = ss[1].split('x')