mirror of
https://github.com/soimort/you-get.git
synced 2025-03-13 11:24:02 +03:00
add support for NetEase, fix #59
This commit is contained in:
parent
bda672e404
commit
ff7adf5bc4
@ -25,6 +25,7 @@ Fork me on GitHub: <https://github.com/soimort/you-get>
|
|||||||
* ifeng (凤凰视频) <http://v.ifeng.com>
|
* ifeng (凤凰视频) <http://v.ifeng.com>
|
||||||
* iQIYI (爱奇艺) <http://www.iqiyi.com>
|
* iQIYI (爱奇艺) <http://www.iqiyi.com>
|
||||||
* Ku6 (酷6网) <http://www.ku6.com>
|
* Ku6 (酷6网) <http://www.ku6.com>
|
||||||
|
* NetEase (网易) <http://v.163.com>
|
||||||
* PPTV <http://www.pptv.com>
|
* PPTV <http://www.pptv.com>
|
||||||
* QQ (腾讯视频) <http://v.qq.com>
|
* QQ (腾讯视频) <http://v.qq.com>
|
||||||
* Sina (新浪视频) <http://video.sina.com.cn>
|
* Sina (新浪视频) <http://video.sina.com.cn>
|
||||||
@ -216,6 +217,7 @@ You-Get基于优酷下载脚本[iambus/youku-lixian](https://github.com/iambus/y
|
|||||||
* 凤凰视频 <http://v.ifeng.com>
|
* 凤凰视频 <http://v.ifeng.com>
|
||||||
* 爱奇艺 <http://www.iqiyi.com>
|
* 爱奇艺 <http://www.iqiyi.com>
|
||||||
* 酷6网 <http://www.ku6.com>
|
* 酷6网 <http://www.ku6.com>
|
||||||
|
* 网易 <http://v.163.com>
|
||||||
* PPTV <http://www.pptv.com>
|
* PPTV <http://www.pptv.com>
|
||||||
* 腾讯视频 <http://v.qq.com>
|
* 腾讯视频 <http://v.qq.com>
|
||||||
* 新浪视频 <http://video.sina.com.cn>
|
* 新浪视频 <http://video.sina.com.cn>
|
||||||
|
@ -28,6 +28,7 @@ Supported Sites (As of Now)
|
|||||||
* ifeng (凤凰视频) http://v.ifeng.com
|
* ifeng (凤凰视频) http://v.ifeng.com
|
||||||
* iQIYI (爱奇艺) http://www.iqiyi.com
|
* iQIYI (爱奇艺) http://www.iqiyi.com
|
||||||
* Ku6 (酷6网) http://www.ku6.com
|
* Ku6 (酷6网) http://www.ku6.com
|
||||||
|
* NetEase (网易) http://v.163.com
|
||||||
* PPTV http://www.pptv.com
|
* PPTV http://www.pptv.com
|
||||||
* QQ (腾讯视频) http://v.qq.com
|
* QQ (腾讯视频) http://v.qq.com
|
||||||
* Sina (新浪视频) http://video.sina.com.cn
|
* Sina (新浪视频) http://video.sina.com.cn
|
||||||
|
@ -8,6 +8,7 @@ from .googleplus import *
|
|||||||
from .ifeng import *
|
from .ifeng import *
|
||||||
from .iqiyi import *
|
from .iqiyi import *
|
||||||
from .ku6 import *
|
from .ku6 import *
|
||||||
|
from .netease import *
|
||||||
from .pptv import *
|
from .pptv import *
|
||||||
from .qq import *
|
from .qq import *
|
||||||
from .sina import *
|
from .sina import *
|
||||||
|
38
you_get/downloader/netease.py
Normal file
38
you_get/downloader/netease.py
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
__all__ = ['netease_download']
|
||||||
|
|
||||||
|
from ..common import *
|
||||||
|
|
||||||
|
def netease_download(url, output_dir = '.', merge = True, info_only = False):
|
||||||
|
html = get_decoded_html(url)
|
||||||
|
|
||||||
|
src = r1(r'<source src="([^"]+)"', html)
|
||||||
|
title = r1('movieDescription=\'([^\']+)\'', html)
|
||||||
|
|
||||||
|
if title:
|
||||||
|
sd_url = r1(r'(.+)-mobile.mp4', src) + ".flv"
|
||||||
|
_, _, sd_size = url_info(sd_url)
|
||||||
|
|
||||||
|
hd_url = re.sub('/SD/', '/HD/', sd_url)
|
||||||
|
_, _, hd_size = url_info(hd_url)
|
||||||
|
|
||||||
|
if hd_size > sd_size:
|
||||||
|
url, size = hd_url, hd_size
|
||||||
|
else:
|
||||||
|
url, size = sd_url, sd_size
|
||||||
|
ext = 'flv'
|
||||||
|
|
||||||
|
else:
|
||||||
|
title = r1('<title>(.+)</title>', html)
|
||||||
|
url = r1(r'(.+)-list.m3u8', src) + ".mp4"
|
||||||
|
_, _, size = url_info(url)
|
||||||
|
ext = 'mp4'
|
||||||
|
|
||||||
|
print_info(site_info, title, ext, size)
|
||||||
|
if not info_only:
|
||||||
|
download_urls([url], title, ext, size, output_dir = output_dir, merge = merge)
|
||||||
|
|
||||||
|
site_info = "163.com"
|
||||||
|
download = netease_download
|
||||||
|
download_playlist = playlist_not_supported('netease')
|
@ -30,6 +30,6 @@ def qq_download(url, output_dir = '.', merge = True, info_only = False):
|
|||||||
|
|
||||||
qq_download_by_id(id, title, output_dir = output_dir, merge = merge, info_only = info_only)
|
qq_download_by_id(id, title, output_dir = output_dir, merge = merge, info_only = info_only)
|
||||||
|
|
||||||
site_info = "V.QQ.com"
|
site_info = "QQ.com"
|
||||||
download = qq_download
|
download = qq_download
|
||||||
download_playlist = playlist_not_supported('qq')
|
download_playlist = playlist_not_supported('qq')
|
||||||
|
@ -18,6 +18,7 @@ def url_to_module(url):
|
|||||||
|
|
||||||
k = r1(r'([^.]+)', domain)
|
k = r1(r'([^.]+)', domain)
|
||||||
downloads = {
|
downloads = {
|
||||||
|
'163': netease,
|
||||||
'56': w56,
|
'56': w56,
|
||||||
'acfun': acfun,
|
'acfun': acfun,
|
||||||
'bilibili': bilibili,
|
'bilibili': bilibili,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user