Quanmin support.

This commit is contained in:
Valdemar Erk 2017-01-03 23:58:56 +01:00
parent 61d9bf124e
commit 60b6834e54
3 changed files with 27 additions and 0 deletions

View File

@ -408,6 +408,7 @@ Use `--url`/`-u` to get a list of downloadable resource URLs extracted from the
| Naver<br/>네이버 | <http://tvcast.naver.com/> |✓| | | | Naver<br/>네이버 | <http://tvcast.naver.com/> |✓| | |
| 芒果TV | <http://www.mgtv.com/> |✓| | | | 芒果TV | <http://www.mgtv.com/> |✓| | |
| 火猫TV | <http://www.huomao.com/> |✓| | | | 火猫TV | <http://www.huomao.com/> |✓| | |
| 全民Tv | <http://www.quanmin.tv/> |✓| | |
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

@ -65,6 +65,7 @@ SITES = {
'pptv' : 'pptv', 'pptv' : 'pptv',
'qianmo' : 'qianmo', 'qianmo' : 'qianmo',
'qq' : 'qq', 'qq' : 'qq',
'quanmin' : 'quanmin',
'showroom-live' : 'showroom', 'showroom-live' : 'showroom',
'sina' : 'sina', 'sina' : 'sina',
'smgbb' : 'bilibili', 'smgbb' : 'bilibili',

View File

@ -0,0 +1,25 @@
#!/usr/bin/env python
__all__ = ['quanmin_download']
from ..common import *
import json
import time
def quanmin_download(url, output_dir = '.', merge = True, info_only = False, **kwargs):
roomid = url[url.rfind("/")+1:]
json_request_url = 'http://www.quanmin.tv/json/rooms/{}/info4.json'.format(roomid)
content = get_html(json_request_url)
data = json.loads(content)
title = data["title"]
real_url = "http://flv.quanmin.tv/live/{}.flv".format(roomid)
print_info(site_info, title, 'flv', float('inf'))
if not info_only:
download_urls([real_url], title, 'flv', None, output_dir, merge = merge)
site_info = "quanmin.tv"
download = quanmin_download
download_playlist = playlist_not_supported('quanmin')