mirror of
https://github.com/l1ving/youtube-dl
synced 2025-03-11 11:07:15 +08:00
[puhutv] ignoring HLS formats and fixing sorting
This commit is contained in:
parent
3b1d761047
commit
18c33dbf93
@ -18,7 +18,7 @@ class PuhuTVIE(InfoExtractor):
|
|||||||
_TESTS = [
|
_TESTS = [
|
||||||
{ # A Film
|
{ # A Film
|
||||||
'url': 'https://puhutv.com/sut-kardesler-izle',
|
'url': 'https://puhutv.com/sut-kardesler-izle',
|
||||||
'md5': '51f11ccdeef908753b4e3a99d19be939',
|
'md5': 'a347470371d56e1585d1b2c8dab01c96',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': '5085',
|
'id': '5085',
|
||||||
'display_id': 'sut-kardesler',
|
'display_id': 'sut-kardesler',
|
||||||
@ -33,7 +33,7 @@ class PuhuTVIE(InfoExtractor):
|
|||||||
},
|
},
|
||||||
{ # An Episode
|
{ # An Episode
|
||||||
'url': 'https://puhutv.com/jet-sosyete-1-bolum-izle',
|
'url': 'https://puhutv.com/jet-sosyete-1-bolum-izle',
|
||||||
'md5': 'e47096511f5ee1fee3586a5714955a25',
|
'md5': '3cd1f4b931cff5e009dfa46a3b88a42a',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': '18501',
|
'id': '18501',
|
||||||
'display_id': 'jet-sosyete-1-bolum',
|
'display_id': 'jet-sosyete-1-bolum',
|
||||||
@ -48,7 +48,7 @@ class PuhuTVIE(InfoExtractor):
|
|||||||
},
|
},
|
||||||
{ # Has subtitle
|
{ # Has subtitle
|
||||||
'url': 'https://puhutv.com/dip-1-bolum-izle',
|
'url': 'https://puhutv.com/dip-1-bolum-izle',
|
||||||
'md5': 'ef912104860ad0496b73c57d7f03bf8e',
|
'md5': 'f27792b1169f42ab318c38887ad5b28e',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': '18944',
|
'id': '18944',
|
||||||
'display_id': 'dip-1-bolum',
|
'display_id': 'dip-1-bolum',
|
||||||
@ -129,19 +129,12 @@ class PuhuTVIE(InfoExtractor):
|
|||||||
media_url = format.get('url')
|
media_url = format.get('url')
|
||||||
ext = format.get('video_format')
|
ext = format.get('video_format')
|
||||||
quality = format.get('quality')
|
quality = format.get('quality')
|
||||||
if ext == 'hls':
|
if ext == 'mp4' and format.get('is_playlist') == False:
|
||||||
format_id = 'hls-%s' % quality
|
formats.append({
|
||||||
formats.extend(self._extract_m3u8_formats(
|
'url': media_url,
|
||||||
media_url, video_id, 'm3u8', preference=-1,
|
'format_id': 'http-%s' % quality,
|
||||||
m3u8_id=format_id, fatal=False))
|
'ext': ext
|
||||||
else:
|
})
|
||||||
if format.get('is_playlist') == False:
|
|
||||||
formats.append({
|
|
||||||
'url': media_url,
|
|
||||||
'format_id': 'http-%s' % quality,
|
|
||||||
'ext': ext
|
|
||||||
})
|
|
||||||
self._sort_formats(formats)
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'id': id,
|
'id': id,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user