mirror of
https://github.com/soimort/you-get.git
synced 2025-02-12 04:55:21 +03:00
Merge branch 'quanmin-support' into develop
This commit is contained in:
commit
bc6a3757e7
@ -9,11 +9,13 @@ import time
|
|||||||
def quanmin_download(url, output_dir = '.', merge = True, info_only = False, **kwargs):
|
def quanmin_download(url, output_dir = '.', merge = True, info_only = False, **kwargs):
|
||||||
roomid = url[url.rfind("/")+1:]
|
roomid = url[url.rfind("/")+1:]
|
||||||
json_request_url = 'http://www.quanmin.tv/json/rooms/{}/info4.json'.format(roomid)
|
json_request_url = 'http://www.quanmin.tv/json/rooms/{}/info4.json'.format(roomid)
|
||||||
|
|
||||||
content = get_html(json_request_url)
|
content = get_html(json_request_url)
|
||||||
data = json.loads(content)
|
data = json.loads(content)
|
||||||
|
|
||||||
title = data["title"]
|
title = data["title"]
|
||||||
|
|
||||||
|
if not data["play_status"]:
|
||||||
|
raise ValueError("The live stream is not online!")
|
||||||
real_url = "http://flv.quanmin.tv/live/{}.flv".format(roomid)
|
real_url = "http://flv.quanmin.tv/live/{}.flv".format(roomid)
|
||||||
|
|
||||||
print_info(site_info, title, 'flv', float('inf'))
|
print_info(site_info, title, 'flv', float('inf'))
|
||||||
|
Loading…
Reference in New Issue
Block a user