diff --git a/README.md b/README.md index 183d65ac..19443b71 100644 --- a/README.md +++ b/README.md @@ -373,6 +373,7 @@ Use `--url`/`-u` to get a list of downloadable resource URLs extracted from the | 央视网 | |✓| | | | 花瓣 | | |✓| | | 东方财富 | |✓| | | +| 第一财经 | |✓| | | For all other sites not on the list, the universal extractor will take care of finding and downloading interesting resources from the page. diff --git a/src/you_get/common.py b/src/you_get/common.py index 5bc5870b..0eb7e133 100755 --- a/src/you_get/common.py +++ b/src/you_get/common.py @@ -87,7 +87,8 @@ SITES = { 'youtu' : 'youtube', 'youtube' : 'youtube', 'zhanqi' : 'zhanqi', - 'eastmoney' : 'eastmoney' + 'eastmoney' : 'eastmoney', + 'yicai' : 'yicai' } import getopt diff --git a/src/you_get/extractors/__init__.py b/src/you_get/extractors/__init__.py index f691f26c..6d431143 100755 --- a/src/you_get/extractors/__init__.py +++ b/src/you_get/extractors/__init__.py @@ -76,3 +76,4 @@ from .youtube import * from .ted import * from .khan import * from .eastmoney import * +from .yicai import * diff --git a/src/you_get/extractors/yicai.py b/src/you_get/extractors/yicai.py new file mode 100644 index 00000000..28766c11 --- /dev/null +++ b/src/you_get/extractors/yicai.py @@ -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'

(.+)

') + url = match1(html, r'