mirror of
https://github.com/soimort/you-get.git
synced 2025-02-11 20:52:31 +03:00
add extrator for: http://www.yicai.com/video/
This commit is contained in:
parent
50446e4273
commit
5b25857f39
@ -373,6 +373,7 @@ Use `--url`/`-u` to get a list of downloadable resource URLs extracted from the
|
|||||||
| 央视网 | <http://www.cntv.cn/> |✓| | |
|
| 央视网 | <http://www.cntv.cn/> |✓| | |
|
||||||
| 花瓣 | <http://huaban.com/> | |✓| |
|
| 花瓣 | <http://huaban.com/> | |✓| |
|
||||||
| 东方财富 | <http://video.eastmoney.com/> |✓| | |
|
| 东方财富 | <http://video.eastmoney.com/> |✓| | |
|
||||||
|
| 第一财经 | <http://www.yicai.com/video/> |✓| | |
|
||||||
|
|
||||||
|
|
||||||
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.
|
||||||
|
@ -87,7 +87,8 @@ SITES = {
|
|||||||
'youtu' : 'youtube',
|
'youtu' : 'youtube',
|
||||||
'youtube' : 'youtube',
|
'youtube' : 'youtube',
|
||||||
'zhanqi' : 'zhanqi',
|
'zhanqi' : 'zhanqi',
|
||||||
'eastmoney' : 'eastmoney'
|
'eastmoney' : 'eastmoney',
|
||||||
|
'yicai' : 'yicai'
|
||||||
}
|
}
|
||||||
|
|
||||||
import getopt
|
import getopt
|
||||||
|
@ -76,3 +76,4 @@ from .youtube import *
|
|||||||
from .ted import *
|
from .ted import *
|
||||||
from .khan import *
|
from .khan import *
|
||||||
from .eastmoney import *
|
from .eastmoney import *
|
||||||
|
from .yicai import *
|
||||||
|
20
src/you_get/extractors/yicai.py
Normal file
20
src/you_get/extractors/yicai.py
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
__all__ = ['yicai_download']
|
||||||
|
|
||||||
|
from ..common import *
|
||||||
|
|
||||||
|
def yicai_download(url, output_dir = '.', merge = True, info_only = False, **kwargs):
|
||||||
|
if "www.yicai.com" in url:
|
||||||
|
url = url.replace('www.yicai.com','m.yicai.com')
|
||||||
|
html = get_content(url)
|
||||||
|
title = match1(html, r'<h1 class="f-ff3">(.+)</h1>')
|
||||||
|
url = match1(html, r'<source.+?src="([^"]+)"')
|
||||||
|
_, 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 = "*.yicai.com/video"
|
||||||
|
download = yicai_download
|
||||||
|
download_playlist = playlist_not_supported('yicai')
|
Loading…
Reference in New Issue
Block a user