projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
auto-generating manpage from README.md (closes #151); redesigned Makefile
[youtube-dl]
/
youtube_dl
/
FileDownloader.py
diff --git
a/youtube_dl/FileDownloader.py
b/youtube_dl/FileDownloader.py
index b234f185701e0194bca822a88747192ea56b1974..14e872a98a922606b8a3f3ea15a9d3d61ef87274 100644
(file)
--- a/
youtube_dl/FileDownloader.py
+++ b/
youtube_dl/FileDownloader.py
@@
-14,7
+14,7
@@
import urllib2
if os.name == 'nt':
import ctypes
if os.name == 'nt':
import ctypes
-from
U
tils import *
+from
u
tils import *
class FileDownloader(object):
class FileDownloader(object):
@@
-344,6
+344,8
@@
class FileDownloader(object):
def process_info(self, info_dict):
"""Process a single dictionary returned by an InfoExtractor."""
def process_info(self, info_dict):
"""Process a single dictionary returned by an InfoExtractor."""
+ info_dict['stitle'] = sanitize_filename(info_dict['title'])
+
reason = self._match_entry(info_dict)
if reason is not None:
self.to_screen(u'[download] ' + reason)
reason = self._match_entry(info_dict)
if reason is not None:
self.to_screen(u'[download] ' + reason)
@@
-470,7
+472,13
@@
class FileDownloader(object):
suitable_found = True
# Extract information from URL and process it
suitable_found = True
# Extract information from URL and process it
- ie.extract(url)
+ videos = ie.extract(url)
+ for video in videos or []:
+ try:
+ self.increment_downloads()
+ self.process_info(video)
+ except UnavailableVideoError:
+ self.trouble(u'\nERROR: unable to download video')
# Suitable InfoExtractor had been found; go to next URL
break
# Suitable InfoExtractor had been found; go to next URL
break