This commit is contained in:
Vito Van 2016-05-11 09:47:58 +08:00
parent 7dc471f18e
commit 50446e4273
4 changed files with 26 additions and 0 deletions

View File

@ -372,6 +372,8 @@ Use `--url`/`-u` to get a list of downloadable resource URLs extracted from the
| 战旗TV | <http://www.zhanqi.tv/lives> |✓| | | | 战旗TV | <http://www.zhanqi.tv/lives> |✓| | |
| 央视网 | <http://www.cntv.cn/> |✓| | | | 央视网 | <http://www.cntv.cn/> |✓| | |
| 花瓣 | <http://huaban.com/> | |✓| | | 花瓣 | <http://huaban.com/> | |✓| |
| 东方财富 | <http://video.eastmoney.com/> |✓| | |
For all other sites not on the list, the universal extractor will take care of finding and downloading interesting resources from the page. For all other sites not on the list, the universal extractor will take care of finding and downloading interesting resources from the page.

View File

@ -87,6 +87,7 @@ SITES = {
'youtu' : 'youtube', 'youtu' : 'youtube',
'youtube' : 'youtube', 'youtube' : 'youtube',
'zhanqi' : 'zhanqi', 'zhanqi' : 'zhanqi',
'eastmoney' : 'eastmoney'
} }
import getopt import getopt

View File

@ -75,3 +75,4 @@ from .youku import *
from .youtube import * from .youtube import *
from .ted import * from .ted import *
from .khan import * from .khan import *
from .eastmoney import *

View File

@ -0,0 +1,22 @@
#!/usr/bin/env python
__all__ = ['eastmoney_download']
from ..common import *
def eastmoney_download(url, output_dir = '.', merge = True, info_only = False, **kwargs):
if "video.eastmoney.com" in url:
html = get_content(url)
title = match1(html, r'<h1>(.+)</h1>')
src = match1(html, r'src="http://player.kankanews.com/embed/([^"]+)"')
frame_url = 'http://player.kankanews.com/embed/' + src
frame_html = get_content(frame_url)
url = match1(frame_html, r'var mp4 = "([^"]+)"')
_, ext, size = url_info(url)
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 = "video.eastmoney.com"
download = eastmoney_download
download_playlist = playlist_not_supported('eastmoney')