mirror of
https://github.com/soimort/you-get.git
synced 2025-02-03 08:43:58 +03:00
Catfun: reformat
This commit is contained in:
parent
f78e4c8078
commit
07a224ed7c
@ -18,7 +18,6 @@ def parse_item(item):
|
|||||||
urls.append(i.getElementsByTagName("url")[0].firstChild.nodeValue)
|
urls.append(i.getElementsByTagName("url")[0].firstChild.nodeValue)
|
||||||
size += int(i.getElementsByTagName("size")[0].firstChild.nodeValue);
|
size += int(i.getElementsByTagName("size")[0].firstChild.nodeValue);
|
||||||
return urls, ext, size
|
return urls, ext, size
|
||||||
pass
|
|
||||||
|
|
||||||
elif item["type"] == "qq":
|
elif item["type"] == "qq":
|
||||||
page = get_content("http://www.catfun.tv/index.php?m=catfun&c=catfun_video&a=get_qq_video_info&qq_id=" + item["vid"])
|
page = get_content("http://www.catfun.tv/index.php?m=catfun&c=catfun_video&a=get_qq_video_info&qq_id=" + item["vid"])
|
||||||
@ -31,7 +30,6 @@ def parse_item(item):
|
|||||||
vtype, ext, _size = url_info(url)
|
vtype, ext, _size = url_info(url)
|
||||||
size += _size
|
size += _size
|
||||||
return urls, ext, size
|
return urls, ext, size
|
||||||
pass
|
|
||||||
|
|
||||||
elif item["type"] == "sina":
|
elif item["type"] == "sina":
|
||||||
page = get_content("http://www.catfun.tv/index.php?m=catfun&c=catfun_video&a=get_sina_video_info&sina_id=" + item["vid"])
|
page = get_content("http://www.catfun.tv/index.php?m=catfun&c=catfun_video&a=get_sina_video_info&sina_id=" + item["vid"])
|
||||||
@ -52,9 +50,6 @@ def parse_item(item):
|
|||||||
size += _size
|
size += _size
|
||||||
#sina's result does not contains content-type
|
#sina's result does not contains content-type
|
||||||
return urls, ext, size
|
return urls, ext, size
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def catfun_download(url, output_dir = '.', merge = True, info_only = False):
|
def catfun_download(url, output_dir = '.', merge = True, info_only = False):
|
||||||
# html = get_content(url)
|
# html = get_content(url)
|
||||||
@ -72,9 +67,10 @@ def catfun_download(url, output_dir = '.', merge = True, info_only = False):
|
|||||||
else:
|
else:
|
||||||
urls, ext, size = parse_item(item)
|
urls, ext, size = parse_item(item)
|
||||||
|
|
||||||
download_urls(urls,t,ext,size,output_dir)
|
print_info(site_info, title, ext, size)
|
||||||
|
if not info_only:
|
||||||
|
download_urls(urls, t, ext, size, output_dir, merge=merge)
|
||||||
|
|
||||||
|
site_info = "CatFun.tv"
|
||||||
site_info = "catfun.com"
|
|
||||||
download = catfun_download
|
download = catfun_download
|
||||||
download_playlist = playlist_not_supported('catfun')
|
download_playlist = playlist_not_supported('catfun')
|
Loading…
Reference in New Issue
Block a user