Merge branch 'le_sports' of https://github.com/rosynirvana/you-get into rosynirvana-le_sports

- Close #1000
- Close #1200
- Close #1469
This commit is contained in:
Mort Yao 2017-05-20 21:57:07 +02:00
commit 24099c7efe
No known key found for this signature in database
GPG Key ID: 07DA00CB78203251

View File

@ -132,8 +132,14 @@ def letvcloud_download(url, output_dir='.', merge=True, info_only=False):
letvcloud_download_by_vu(vu, uu, title=title, output_dir=output_dir, merge=merge, info_only=info_only)
def letv_download(url, output_dir='.', merge=True, info_only=False ,**kwargs):
url = url_locations([url])[0]
if re.match(r'http://yuntv.letv.com/', url):
letvcloud_download(url, output_dir=output_dir, merge=merge, info_only=info_only)
elif 'sports.le.com' in url:
html = get_content(url)
vid = match1(url, r'video/(\d+)\.html')
title = match1(html, r'<h2 class="title">([^<]+)</h2>')
letv_download_by_vid(vid, title=title, output_dir=output_dir, merge=merge, info_only=info_only,**kwargs)
else:
html = get_content(url)
vid = match1(url, r'http://www.letv.com/ptv/vplay/(\d+).html') or \