This commit is contained in:
codepongo 2013-04-26 10:03:37 +08:00
commit 8e6ea06a96
4 changed files with 20 additions and 7 deletions

View File

@ -1,6 +1,14 @@
Changelog
=========
0.3.11
------
*Date: 2013-04-26*
* Add support for:
- Google Drive (Google Docs)
0.3.10
------

View File

@ -537,7 +537,8 @@ def playlist_not_supported(name):
return f
def print_info(site_info, title, type, size):
type = str(type).lower()
if type:
type = type.lower()
if type in ['3gp']:
type = 'video/3gpp'
elif type in ['asf', 'wmv']:

View File

@ -83,10 +83,14 @@ def coursera_download(url, output_dir = '.', merge = True, info_only = False):
ext = r1(r'format=(.+)', resource_url) or r1(r'\.(\w\w\w\w|\w\w\w|\w\w|\w)$', resource_url) or r1(r'download.(mp4)', resource_url)
_, _, size = url_info(resource_url)
if ext == 'mp4':
download_urls([resource_url], title, ext, size, output_dir, merge = merge)
else:
download_url_chunked(resource_url, title, ext, size, output_dir, merge = merge)
try:
if ext == 'mp4':
download_urls([resource_url], title, ext, size, output_dir, merge = merge)
else:
download_url_chunked(resource_url, title, ext, size, output_dir, merge = merge)
except Exception as err:
print('Skipping %s: %s\n' % (resource_url, err))
continue
return

View File

@ -2,5 +2,5 @@
__all__ = ['__version__', '__date__']
__version__ = '0.3.10'
__date__ = '2013-04-19'
__version__ = '0.3.11'
__date__ = '2013-04-26'