fix of 'topic' url

This commit is contained in:
Justsoos 2017-01-26 15:46:47 +08:00
parent 23f9803482
commit 3fff227106

View File

@ -10,6 +10,8 @@ def zhanqi_download(url, output_dir = '.', merge = True, info_only = False, **kw
first_folder_path = url.split('/')[3]
if first_folder_path != 'videos': #url = "https://www.zhanqi.tv/huashan"
if first_folder_path == 'topic': #https://www.zhanqi.tv/topic/lyingman
first_folder_path = url.split('/')[4]
api_url = "https://www.zhanqi.tv/api/static/v2.1/room/domain/" + first_folder_path + ".json"
api_json = json.loads(get_html(api_url))
data = api_json['data']