Browse Source

Clean up superfluous whitespace

rtmp_test
Philipp Hagemeister 13 years ago
parent
commit
fff24d5e35
2 changed files with 11 additions and 12 deletions
  1. +6
    -6
      youtube-dl
  2. +5
    -6
      youtube_dl/__init__.py

+ 6
- 6
youtube-dl View File

@ -15,6 +15,7 @@ __authors__ = (
'Kevin Ngo', 'Kevin Ngo',
'Ori Avtalion', 'Ori Avtalion',
'shizeeg', 'shizeeg',
'Filippo Valsorda',
) )
__license__ = 'Public Domain' __license__ = 'Public Domain'
@ -3093,14 +3094,14 @@ class BlipTVIE(InfoExtractor):
data = json_data['Post'] data = json_data['Post']
else: else:
data = json_data data = json_data
upload_date = datetime.datetime.strptime(data['datestamp'], '%m-%d-%y %H:%M%p').strftime('%Y%m%d') upload_date = datetime.datetime.strptime(data['datestamp'], '%m-%d-%y %H:%M%p').strftime('%Y%m%d')
video_url = data['media']['url'] video_url = data['media']['url']
umobj = re.match(self._URL_EXT, video_url) umobj = re.match(self._URL_EXT, video_url)
if umobj is None: if umobj is None:
raise ValueError('Can not determine filename extension') raise ValueError('Can not determine filename extension')
ext = umobj.group(1) ext = umobj.group(1)
info = { info = {
'id': data['item_id'], 'id': data['item_id'],
'url': video_url, 'url': video_url,
@ -3201,7 +3202,7 @@ class ComedyCentralIE(InfoExtractor):
def report_extraction(self, episode_id): def report_extraction(self, episode_id):
self._downloader.to_screen(u'[comedycentral] %s: Extracting information' % episode_id) self._downloader.to_screen(u'[comedycentral] %s: Extracting information' % episode_id)
def report_config_download(self, episode_id): def report_config_download(self, episode_id):
self._downloader.to_screen(u'[comedycentral] %s: Downloading configuration' % episode_id) self._downloader.to_screen(u'[comedycentral] %s: Downloading configuration' % episode_id)
@ -3763,7 +3764,6 @@ class MixcloudIE(InfoExtractor):
url_list = jsonData[fmt][bitrate] url_list = jsonData[fmt][bitrate]
except TypeError: # we have no bitrate info. except TypeError: # we have no bitrate info.
url_list = jsonData[fmt] url_list = jsonData[fmt]
return url_list return url_list
def check_urls(self, url_list): def check_urls(self, url_list):
@ -3883,7 +3883,7 @@ class StanfordOpenClassroomIE(InfoExtractor):
info = { info = {
'id': _simplify_title(course + '_' + video), 'id': _simplify_title(course + '_' + video),
} }
self.report_extraction(info['id']) self.report_extraction(info['id'])
baseUrl = 'http://openclassroom.stanford.edu/MainFolder/courses/' + course + '/videos/' baseUrl = 'http://openclassroom.stanford.edu/MainFolder/courses/' + course + '/videos/'
xmlUrl = baseUrl + video + '.xml' xmlUrl = baseUrl + video + '.xml'
@ -4688,7 +4688,7 @@ def _real_main():
parser.error(u'you must provide at least one URL') parser.error(u'you must provide at least one URL')
else: else:
sys.exit() sys.exit()
try: try:
retcode = fd.download(all_urls) retcode = fd.download(all_urls)
except MaxDownloadsReached: except MaxDownloadsReached:


+ 5
- 6
youtube_dl/__init__.py View File

@ -3094,14 +3094,14 @@ class BlipTVIE(InfoExtractor):
data = json_data['Post'] data = json_data['Post']
else: else:
data = json_data data = json_data
upload_date = datetime.datetime.strptime(data['datestamp'], '%m-%d-%y %H:%M%p').strftime('%Y%m%d') upload_date = datetime.datetime.strptime(data['datestamp'], '%m-%d-%y %H:%M%p').strftime('%Y%m%d')
video_url = data['media']['url'] video_url = data['media']['url']
umobj = re.match(self._URL_EXT, video_url) umobj = re.match(self._URL_EXT, video_url)
if umobj is None: if umobj is None:
raise ValueError('Can not determine filename extension') raise ValueError('Can not determine filename extension')
ext = umobj.group(1) ext = umobj.group(1)
info = { info = {
'id': data['item_id'], 'id': data['item_id'],
'url': video_url, 'url': video_url,
@ -3202,7 +3202,7 @@ class ComedyCentralIE(InfoExtractor):
def report_extraction(self, episode_id): def report_extraction(self, episode_id):
self._downloader.to_screen(u'[comedycentral] %s: Extracting information' % episode_id) self._downloader.to_screen(u'[comedycentral] %s: Extracting information' % episode_id)
def report_config_download(self, episode_id): def report_config_download(self, episode_id):
self._downloader.to_screen(u'[comedycentral] %s: Downloading configuration' % episode_id) self._downloader.to_screen(u'[comedycentral] %s: Downloading configuration' % episode_id)
@ -3764,7 +3764,6 @@ class MixcloudIE(InfoExtractor):
url_list = jsonData[fmt][bitrate] url_list = jsonData[fmt][bitrate]
except TypeError: # we have no bitrate info. except TypeError: # we have no bitrate info.
url_list = jsonData[fmt] url_list = jsonData[fmt]
return url_list return url_list
def check_urls(self, url_list): def check_urls(self, url_list):
@ -3884,7 +3883,7 @@ class StanfordOpenClassroomIE(InfoExtractor):
info = { info = {
'id': _simplify_title(course + '_' + video), 'id': _simplify_title(course + '_' + video),
} }
self.report_extraction(info['id']) self.report_extraction(info['id'])
baseUrl = 'http://openclassroom.stanford.edu/MainFolder/courses/' + course + '/videos/' baseUrl = 'http://openclassroom.stanford.edu/MainFolder/courses/' + course + '/videos/'
xmlUrl = baseUrl + video + '.xml' xmlUrl = baseUrl + video + '.xml'
@ -4689,7 +4688,7 @@ def _real_main():
parser.error(u'you must provide at least one URL') parser.error(u'you must provide at least one URL')
else: else:
sys.exit() sys.exit()
try: try:
retcode = fd.download(all_urls) retcode = fd.download(all_urls)
except MaxDownloadsReached: except MaxDownloadsReached:


Loading…
Cancel
Save