mirror of
https://github.com/soimort/you-get.git
synced 2025-02-11 12:42:29 +03:00
fix of 'topic' url
This commit is contained in:
parent
23f9803482
commit
3fff227106
@ -4,12 +4,14 @@ __all__ = ['zhanqi_download']
|
||||
|
||||
from ..common import *
|
||||
import json
|
||||
|
||||
|
||||
def zhanqi_download(url, output_dir = '.', merge = True, info_only = False, **kwargs):#the programmers of zhanqi are noobs
|
||||
host_name = url.split('/')[2]
|
||||
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']
|
||||
|
Loading…
Reference in New Issue
Block a user