mirror of
https://github.com/soimort/you-get.git
synced 2025-01-23 13:35:16 +03:00
Mgtv: add another format of url
Fix indentation causing undefined variable
This commit is contained in:
parent
15cc69a120
commit
e914a4bbbf
@ -47,6 +47,8 @@ class MGTV(VideoExtractor):
|
|||||||
vid = match1(url, 'https?://www.mgtv.com/(?:b|l)/\d+/(\d+).html')
|
vid = match1(url, 'https?://www.mgtv.com/(?:b|l)/\d+/(\d+).html')
|
||||||
if not vid:
|
if not vid:
|
||||||
vid = match1(url, 'https?://www.mgtv.com/hz/bdpz/\d+/(\d+).html')
|
vid = match1(url, 'https?://www.mgtv.com/hz/bdpz/\d+/(\d+).html')
|
||||||
|
if not vid:
|
||||||
|
vid = match1(url, 'https?://www.mgtv.com/s/(\d+).html')
|
||||||
return vid
|
return vid
|
||||||
|
|
||||||
# ----------------------------------------------------------------------
|
# ----------------------------------------------------------------------
|
||||||
@ -125,21 +127,21 @@ class MGTV(VideoExtractor):
|
|||||||
for i in segment_list_this:
|
for i in segment_list_this:
|
||||||
stream_fileid_list.append(os.path.basename(i).split('.')[0])
|
stream_fileid_list.append(os.path.basename(i).split('.')[0])
|
||||||
|
|
||||||
# make pieces
|
# make pieces
|
||||||
pieces = []
|
pieces = []
|
||||||
for i in zip(stream_fileid_list, segment_list_this):
|
for i in zip(stream_fileid_list, segment_list_this):
|
||||||
pieces.append({'fileid': i[0], 'segs': i[1], })
|
pieces.append({'fileid': i[0], 'segs': i[1], })
|
||||||
|
|
||||||
self.streams[quality_id] = {
|
self.streams[quality_id] = {
|
||||||
'container': s['container'],
|
'container': s['container'],
|
||||||
'video_profile': s['video_profile'],
|
'video_profile': s['video_profile'],
|
||||||
'size': m3u8_size,
|
'size': m3u8_size,
|
||||||
'pieces': pieces,
|
'pieces': pieces,
|
||||||
'm3u8_url': m3u8_url
|
'm3u8_url': m3u8_url
|
||||||
}
|
}
|
||||||
|
|
||||||
if not kwargs['info_only']:
|
if not kwargs['info_only']:
|
||||||
self.streams[quality_id]['src'] = segment_list_this
|
self.streams[quality_id]['src'] = segment_list_this
|
||||||
|
|
||||||
def extract(self, **kwargs):
|
def extract(self, **kwargs):
|
||||||
if 'stream_id' in kwargs and kwargs['stream_id']:
|
if 'stream_id' in kwargs and kwargs['stream_id']:
|
||||||
|
Loading…
Reference in New Issue
Block a user