mirror of
https://github.com/soimort/you-get.git
synced 2025-01-23 13:35:16 +03:00
support zhanqi.tv #444
This commit is contained in:
parent
810535a64b
commit
7afeecf4d7
@ -1,4 +1,4 @@
|
||||
# You-Get
|
||||
# You-Get
|
||||
|
||||
[![Build Status](https://api.travis-ci.org/soimort/you-get.png)](https://travis-ci.org/soimort/you-get) [![PyPI version](https://badge.fury.io/py/you-get.png)](http://badge.fury.io/py/you-get)
|
||||
|
||||
@ -75,6 +75,7 @@ Others:
|
||||
* 56 (56网) <http://www.56.com>
|
||||
* Xiami (虾米) <http://www.xiami.com>
|
||||
* YinYueTai (音悦台) <http://www.yinyuetai.com>
|
||||
* Zhanqi (战旗TV) <http://www.zhanqi.tv/lives>
|
||||
|
||||
## Prerequisites
|
||||
|
||||
|
@ -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, 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
|
||||
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, zhanqi
|
||||
|
||||
video_host = r1(r'https?://([^/]+)/', url)
|
||||
video_url = r1(r'https?://[^/]+(.*)', url)
|
||||
@ -971,6 +971,7 @@ def url_to_module(url):
|
||||
'youku': youku,
|
||||
'youtu': youtube,
|
||||
'youtube': youtube,
|
||||
'zhanqi': zhanqi,
|
||||
}
|
||||
if k in downloads:
|
||||
return downloads[k], url
|
||||
|
28
src/you_get/extractors/zhanqi.py
Normal file
28
src/you_get/extractors/zhanqi.py
Normal file
@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
__all__ = ['zhanqi_download']
|
||||
|
||||
from ..common import *
|
||||
import re
|
||||
|
||||
def zhanqi_download(url, output_dir = '.', merge = True, info_only = False):
|
||||
html = get_content(url)
|
||||
rtmp_base_patt = r'VideoUrl":"([^"]+)"'
|
||||
rtmp_id_patt = r'VideoID":"([^"]+)"'
|
||||
title_patt = r'<p class="title-name" title="[^"]+">([^<]+)</p>'
|
||||
title_patt_backup = r'<title>([^<]{1,9999})</title>'
|
||||
|
||||
rtmp_base = match1(html, rtmp_base_patt).replace('\\/','/')
|
||||
rtmp_id = match1(html, rtmp_id_patt).replace('\\/','/')
|
||||
title = match1(html, title_patt) or match1(html, title_patt_backup)
|
||||
title = unescape_html(title)
|
||||
|
||||
real_url = rtmp_base+'/'+rtmp_id
|
||||
|
||||
print_info(site_info, title, 'flv', float('inf'))
|
||||
if not info_only:
|
||||
download_rtmp_url(real_url, title, 'flv', {}, output_dir, merge = merge)
|
||||
|
||||
site_info = "zhanqi.tv"
|
||||
download = zhanqi_download
|
||||
download_playlist = playlist_not_supported('zhanqi')
|
Loading…
Reference in New Issue
Block a user