Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix some download issues #40

Merged
merged 3 commits into from
Dec 12, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions you_get/downloader/ku6.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,11 @@ def ku6_download_by_id(id, title = None, output_dir = '.', merge = True, info_on
download_urls(urls, title, ext, size, output_dir, merge = merge)

def ku6_download(url, output_dir = '.', merge = True, info_only = False):
id = r1(r'http://v.ku6.com/[a-z]+/show_\d+/(.*)\.\.\.html', url)

patterns = [r'http://v.ku6.com/special/show_\d+/(.*)\.\.\.html',
r'http://v.ku6.com/show/(.*)\.\.\.html',
r'http://my.ku6.com/watch\?.*v=(.*)\.\..*']
id = r1_of(patterns, url)

ku6_download_by_id(id, output_dir = output_dir, merge = merge, info_only = info_only)

site_info = "Ku6.com"
Expand Down
2 changes: 1 addition & 1 deletion you_get/downloader/sina.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def sina_download_by_id(id, title = None, output_dir = '.', merge = True, info_o
download_urls(urls, title, 'flv', size, output_dir = output_dir, merge = merge)

def sina_download(url, output_dir = '.', merge = True, info_only = False):
id = r1(r'ipad_vid:\'(\d+)\',', get_html(url))
id = r1(r'vid :\'(\d+)\',', get_html(url))
sina_download_by_id(id, output_dir = output_dir, merge = merge, info_only = info_only)

site_info = "Sina.com"
Expand Down
2 changes: 1 addition & 1 deletion you_get/downloader/w56.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def w56_download_by_id(id, title = None, output_dir = '.', merge = True, info_on
assert len(files) == 1
size = int(files[0]['filesize'])
url = files[0]['url']
ext = r1(r'\.([^.]+)$', url)
ext = r1(r'\.([^.]+)\?', url)
assert ext in ('flv', 'mp4')

print_info(site_info, title, ext, size)
Expand Down