-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add: Import additional extractors when building; Add icon for executable
- Loading branch information
1 parent
7f4c8d3
commit be4c392
Showing
17 changed files
with
714 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
#!/usr/bin/env python | ||
|
||
from .acfun import * | ||
from .alive import * | ||
from .archive import * | ||
from .baidu import * | ||
from .bandcamp import * | ||
from .bigthink import * | ||
from .bilibili import * | ||
from .bokecc import * | ||
from .cbs import * | ||
from .ckplayer import * | ||
from .cntv import * | ||
from .coub import * | ||
from .dailymotion import * | ||
from .douban import * | ||
from .douyin import * | ||
from .douyutv import * | ||
from .ehow import * | ||
from .facebook import * | ||
from .fc2video import * | ||
from .flickr import * | ||
from .freesound import * | ||
from .funshion import * | ||
from .google import * | ||
from .heavymusic import * | ||
from .icourses import * | ||
from .ifeng import * | ||
from .imgur import * | ||
from .infoq import * | ||
from .instagram import * | ||
from .interest import * | ||
from .iqilu import * | ||
from .iqiyi import * | ||
from .joy import * | ||
from .khan import * | ||
from .ku6 import * | ||
from .kakao import * | ||
from .kuaishou import * | ||
from .kugou import * | ||
from .kuwo import * | ||
from .le import * | ||
from .lizhi import * | ||
from .longzhu import * | ||
from .magisto import * | ||
from .metacafe import * | ||
from .mgtv import * | ||
from .miaopai import * | ||
from .miomio import * | ||
from .mixcloud import * | ||
from .mtv81 import * | ||
from .musicplayon import * | ||
from .nanagogo import * | ||
from .naver import * | ||
from .netease import * | ||
from .nicovideo import * | ||
from .pinterest import * | ||
from .pixnet import * | ||
from .pptv import * | ||
from .qie import * | ||
from .qingting import * | ||
from .qq import * | ||
from .showroom import * | ||
from .sina import * | ||
from .sohu import * | ||
from .soundcloud import * | ||
from .suntv import * | ||
from .ted import * | ||
from .theplatform import * | ||
from .tiktok import * | ||
from .tucao import * | ||
from .tudou import * | ||
from .tumblr import * | ||
from .twitter import * | ||
from .ucas import * | ||
from .veoh import * | ||
from .videomega import * | ||
from .vimeo import * | ||
from .vine import * | ||
from .vk import * | ||
from .w56 import * | ||
from .wanmen import * | ||
from .xiami import * | ||
from .yinyuetai import * | ||
from .yixia import * | ||
from .youku import * | ||
from .youtube import * | ||
from .zhanqi import * | ||
from .zhibo import * | ||
from .zhihu import * | ||
|
||
# Import additional extractors for PyInstaller | ||
# https://github.com/LussacZheng/you-get.exe/blob/master/doc/PyInstaller-Options.md | ||
from .baomihua import * | ||
from .giphy import * | ||
from .huomaotv import * | ||
from .iwara import * | ||
from .ixigua import * | ||
from .missevan import * | ||
from .qie_video import * | ||
from .qq_egame import * | ||
from .toutiao import * | ||
from .vidto import * | ||
from .ximalaya import * | ||
from .yizhibo import * | ||
|
||
# Copy these files from "you-get-0.4.1403.tar.gz" | ||
from ._blip import * | ||
from ._catfun import * | ||
from ._coursera import * | ||
from ._dongting import * | ||
from ._jpopsuki import * | ||
from ._qianmo import * | ||
from ._songtaste import * | ||
from ._thvideo import * | ||
from ._vid48 import * | ||
from ._videobam import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/usr/bin/env python | ||
|
||
__all__ = ['blip_download'] | ||
|
||
from ..common import * | ||
|
||
import json | ||
|
||
def blip_download(url, output_dir = '.', merge = True, info_only = False, **kwargs): | ||
p_url = url + "?skin=json&version=2&no_wrap=1" | ||
html = get_html(p_url) | ||
metadata = json.loads(html) | ||
|
||
title = metadata['Post']['title'] | ||
real_url = metadata['Post']['media']['url'] | ||
type, ext, size = url_info(real_url) | ||
|
||
print_info(site_info, title, type, size) | ||
if not info_only: | ||
download_urls([real_url], title, ext, size, output_dir, merge = merge) | ||
|
||
site_info = "Blip.tv" | ||
download = blip_download | ||
download_playlist = playlist_not_supported('blip') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
#!/usr/bin/env python | ||
|
||
__all__ = ['catfun_download'] | ||
from .tudou import tudou_download_by_id | ||
from .sina import sina_download_by_vid | ||
|
||
from ..common import * | ||
from xml.dom.minidom import * | ||
|
||
def parse_item(item): | ||
if item["type"] == "youku": | ||
page = get_content("http://www.catfun.tv/index.php?m=catfun&c=catfun_video&a=get_youku_video_info&youku_id=" + item["vid"]) | ||
dom = parseString(page) | ||
ext = dom.getElementsByTagName("format")[0].firstChild.nodeValue; | ||
size = 0 | ||
urls = [] | ||
for i in dom.getElementsByTagName("durl"): | ||
urls.append(i.getElementsByTagName("url")[0].firstChild.nodeValue) | ||
size += int(i.getElementsByTagName("size")[0].firstChild.nodeValue); | ||
return urls, ext, size | ||
|
||
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"]) | ||
dom = parseString(page) | ||
size = 0 | ||
urls = [] | ||
for i in dom.getElementsByTagName("durl"): | ||
url = i.getElementsByTagName("url")[0].firstChild.nodeValue | ||
urls.append(url) | ||
vtype, ext, _size = url_info(url) | ||
size += _size | ||
return urls, ext, size | ||
|
||
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"]) | ||
try: | ||
dom = parseString(page) | ||
except: | ||
#refresh page encountered | ||
page = get_content(match1(page, r'url=(.+?)"')) | ||
dom = parseString(page) | ||
size = 0 | ||
urls = [] | ||
for i in dom.getElementsByTagName("durl"): | ||
url = i.getElementsByTagName("url")[0].firstChild.nodeValue | ||
urls.append(url) | ||
vtype, ext, _size = url_info(url) | ||
if not ext: | ||
ext = match1(url,r'\.(\w+?)\?') | ||
size += _size | ||
#sina's result does not contains content-type | ||
return urls, ext, size | ||
|
||
def catfun_download(url, output_dir = '.', merge = True, info_only = False, **kwargs): | ||
# html = get_content(url) | ||
title = match1(get_content(url), r'<h1 class="title">(.+?)</h1>') | ||
vid = match1(url, r"v\d+/cat(\d+)") | ||
j = json.loads(get_content("http://www.catfun.tv/index.php?m=catfun&c=catfun_video&a=get_video&modelid=11&id={}".format(vid))) | ||
for item in j: | ||
if item["name"] != "\u672a\u547d\u540d1": | ||
t = title + "-" + item["name"] | ||
else: | ||
t = title | ||
if item["type"] == "tudou": | ||
tudou_download_by_id(item["vid"], title, output_dir, merge, info_only) | ||
|
||
else: | ||
urls, ext, size = parse_item(item) | ||
|
||
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" | ||
download = catfun_download | ||
download_playlist = playlist_not_supported('catfun') |
Oops, something went wrong.