mirror of
https://github.com/soimort/you-get.git
synced 2025-02-03 00:33:58 +03:00
Merge branch 'twlz0ne-add-support-for-baomihua' into develop
This commit is contained in:
commit
153d8649ca
@ -35,6 +35,7 @@ Others:
|
||||
* Alive.in.th <http://alive.in.th>
|
||||
* Baidu Music (百度音乐) <http://music.baidu.com>
|
||||
* Baidu Wangpan (百度网盘) <http://pan.baidu.com>
|
||||
* Baomihua (爆米花) <http://video.baomihua.com>
|
||||
* bilibili <http://www.bilibili.com>
|
||||
* Blip <http://blip.tv>
|
||||
* Catfun (喵星球) <http://www.catfun.tv>
|
||||
|
@ -899,7 +899,7 @@ def script_main(script_name, download, download_playlist = None):
|
||||
sys.exit(1)
|
||||
|
||||
def url_to_module(url):
|
||||
from .extractors import netease, w56, acfun, baidu, bilibili, blip, catfun, cntv, cbs, coursera, dailymotion, dongting, douban, douyutv, ehow, facebook, freesound, google, sina, ifeng, alive, instagram, iqiyi, joy, jpopsuki, khan, ku6, kugou, kuwo, letv, magisto, miomio, mixcloud, mtv81, nicovideo, pptv, qq, sohu, songtaste, soundcloud, ted, theplatform, tudou, tucao, tumblr, vid48, videobam, vimeo, vine, vk, xiami, yinyuetai, youku, youtube
|
||||
from .extractors import netease, w56, acfun, baidu, baomihua, bilibili, blip, catfun, cntv, cbs, coursera, dailymotion, dongting, douban, douyutv, ehow, facebook, freesound, google, sina, ifeng, alive, instagram, iqiyi, joy, jpopsuki, khan, ku6, kugou, kuwo, letv, magisto, miomio, mixcloud, mtv81, nicovideo, pptv, qq, sohu, songtaste, soundcloud, ted, theplatform, tudou, tucao, tumblr, vid48, videobam, vimeo, vine, vk, xiami, yinyuetai, youku, youtube
|
||||
|
||||
video_host = r1(r'https?://([^/]+)/', url)
|
||||
video_url = r1(r'https?://[^/]+(.*)', url)
|
||||
@ -916,6 +916,7 @@ def url_to_module(url):
|
||||
'56': w56,
|
||||
'acfun': acfun,
|
||||
'baidu': baidu,
|
||||
'baomihua': baomihua,
|
||||
'bilibili': bilibili,
|
||||
'blip': blip,
|
||||
'catfun': catfun,
|
||||
|
33
src/you_get/extractors/baomihua.py
Executable file
33
src/you_get/extractors/baomihua.py
Executable file
@ -0,0 +1,33 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
__all__ = ['baomihua_download', 'baomihua_download_by_id']
|
||||
|
||||
from ..common import *
|
||||
|
||||
import urllib
|
||||
|
||||
def baomihua_download_by_id(id, title = None, output_dir = '.', merge = True, info_only = False):
|
||||
html = get_html('http://play.baomihua.com/getvideourl.aspx?flvid=%s' % id)
|
||||
host = r1(r'host=([^&]*)', html)
|
||||
assert host
|
||||
type = r1(r'videofiletype=([^&]*)', html)
|
||||
assert type
|
||||
vid = r1(r'&stream_name=([0-9\/]+)&', html)
|
||||
assert vid
|
||||
url = "http://%s/pomoho_video/%s.%s" % (host, vid, type)
|
||||
_, ext, size = url_info(url)
|
||||
print_info(site_info, title, type, size)
|
||||
if not info_only:
|
||||
download_urls([url], title, ext, size, output_dir, merge = merge)
|
||||
|
||||
def baomihua_download(url, output_dir = '.', merge = True, info_only = False):
|
||||
html = get_html(url)
|
||||
title = r1(r'<title>(.*)</title>', html)
|
||||
assert title
|
||||
id = r1(r'flvid=(\d+)', html)
|
||||
assert id
|
||||
baomihua_download_by_id(id, title, output_dir = output_dir, merge = merge, info_only = info_only)
|
||||
|
||||
site_info = "baomihua.com"
|
||||
download = baomihua_download
|
||||
download_playlist = playlist_not_supported('baomihua')
|
Loading…
Reference in New Issue
Block a user