diff options
author | Jouke Waleson <jouke.waleson@mendix.com> | 2014-11-23 20:41:03 +0100 |
---|---|---|
committer | Jouke Waleson <jouke.waleson@mendix.com> | 2014-11-23 20:41:03 +0100 |
commit | 5f6a1245ffa9276c1af59b0835afeef67e2fb5b1 (patch) | |
tree | 139c6ede405cf3898e4639f0bf13d32d140fa5f1 /youtube_dl/YoutubeDL.py | |
parent | 598c218f7b5c3e78f98dad40f45646c0c9ec773e (diff) |
PEP8 applied
Diffstat (limited to 'youtube_dl/YoutubeDL.py')
-rwxr-xr-x | youtube_dl/YoutubeDL.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py index bfa0c6d43..c1a529f13 100755 --- a/youtube_dl/YoutubeDL.py +++ b/youtube_dl/YoutubeDL.py @@ -552,7 +552,7 @@ class YoutubeDL(object): try: ie_result = ie.extract(url) - if ie_result is None: # Finished already (backwards compatibility; listformats and friends should be moved here) + if ie_result is None: # Finished already (backwards compatibility; listformats and friends should be moved here) break if isinstance(ie_result, list): # Backwards compatibility: old IE result format @@ -565,7 +565,7 @@ class YoutubeDL(object): return self.process_ie_result(ie_result, download, extra_info) else: return ie_result - except ExtractorError as de: # An error we somewhat expected + except ExtractorError as de: # An error we somewhat expected self.report_error(compat_str(de), de.format_traceback()) break except MaxDownloadsReached: @@ -700,6 +700,7 @@ class YoutubeDL(object): self.report_warning( 'Extractor %s returned a compat_list result. ' 'It needs to be updated.' % ie_result.get('extractor')) + def _fixup(r): self.add_extra_info(r, { @@ -1010,7 +1011,7 @@ class YoutubeDL(object): else: self.to_screen('[info] Writing video subtitles to: ' + sub_filename) with io.open(encodeFilename(sub_filename), 'w', encoding='utf-8') as subfile: - subfile.write(sub) + subfile.write(sub) except (OSError, IOError): self.report_error('Cannot write subtitles file ' + sub_filename) return @@ -1111,7 +1112,7 @@ class YoutubeDL(object): for url in url_list: try: - #It also downloads the videos + # It also downloads the videos res = self.extract_info(url) except UnavailableVideoError: self.report_error('unable to download video') @@ -1428,4 +1429,3 @@ class YoutubeDL(object): if encoding is None: encoding = preferredencoding() return encoding - |