This commit is contained in:
GuanFoxyier 2019-05-24 14:33:17 +08:00
parent 42b2f1afaa
commit 5e5d2540d5

View File

@ -15,10 +15,12 @@ Changelog:
new api new api
''' '''
def real_url(fileName, key, ch): def real_url(fileName, key, ch):
url = "https://data.vod.itc.cn/ip?new=" + fileName + "&num=1&key=" + key + "&ch=" + ch + "&pt=1&pg=2&prod=h5n" url = "https://data.vod.itc.cn/ip?new=" + fileName + "&num=1&key=" + key + "&ch=" + ch + "&pt=1&pg=2&prod=h5n"
return json.loads(get_html(url))['servers'][0]['url'] return json.loads(get_html(url))['servers'][0]['url']
def sohu_download(url, output_dir='.', merge=True, info_only=False, extractor_proxy=None, **kwargs): def sohu_download(url, output_dir='.', merge=True, info_only=False, extractor_proxy=None, **kwargs):
if re.match(r'http://share.vrs.sohu.com', url): if re.match(r'http://share.vrs.sohu.com', url):
vid = r1('id=(\d+)', url) vid = r1('id=(\d+)', url)
@ -72,6 +74,7 @@ def sohu_download(url, output_dir = '.', merge = True, info_only = False, extrac
if not info_only: if not info_only:
download_urls(urls, title, 'mp4', size, output_dir, refer=url, merge=merge) download_urls(urls, title, 'mp4', size, output_dir, refer=url, merge=merge)
site_info = "Sohu.com" site_info = "Sohu.com"
download = sohu_download download = sohu_download
download_playlist = playlist_not_supported('sohu') download_playlist = playlist_not_supported('sohu')