Merge branch 'develop' into print-color

This commit is contained in:
minghu6 2016-05-28 20:47:26 +08:00
commit 3593818176
2 changed files with 9 additions and 1 deletions

View File

@ -7,6 +7,7 @@ from ..extractor import VideoExtractor
from json import loads from json import loads
from urllib.parse import urlsplit from urllib.parse import urlsplit
from os.path import dirname from os.path import dirname
import re
class MGTV(VideoExtractor): class MGTV(VideoExtractor):
name = "芒果 (MGTV)" name = "芒果 (MGTV)"
@ -67,6 +68,7 @@ class MGTV(VideoExtractor):
if s['video_profile'] in stream_available.keys(): if s['video_profile'] in stream_available.keys():
quality_id = self.id_dic[s['video_profile']] quality_id = self.id_dic[s['video_profile']]
url = stream_available[s['video_profile']] url = stream_available[s['video_profile']]
url = re.sub( r'(\&arange\=\d+)', '', url) #Un-Hum
segment_list_this = self.get_mgtv_real_url(url) segment_list_this = self.get_mgtv_real_url(url)
container_this_stream = '' container_this_stream = ''

View File

@ -69,8 +69,14 @@ def twitter_download(url, output_dir='.', merge=True, info_only=False, **kwargs)
vmap = get_content(vmap_url) vmap = get_content(vmap_url)
source = r1(r'<MediaFile>\s*<!\[CDATA\[(.*)\]\]>', vmap) source = r1(r'<MediaFile>\s*<!\[CDATA\[(.*)\]\]>', vmap)
if not item_id: page_title = i['tweet_id'] if not item_id: page_title = i['tweet_id']
elif 'scribe_playlist_url' in i:
scribe_playlist_url = i['scribe_playlist_url']
return vine_download(scribe_playlist_url, output_dir, merge=merge, info_only=info_only)
urls = extract_m3u(source) if source.endswith('.mp4'):
urls = [source]
else:
urls = extract_m3u(source)
size = urls_size(urls) size = urls_size(urls)
mime, ext = 'video/mp4', 'mp4' mime, ext = 'video/mp4', 'mp4'