From: Philipp Hagemeister Date: Thu, 8 Dec 2011 19:39:22 +0000 (+0100) Subject: Merge branch 'master' of github.com:rg3/youtube-dl X-Git-Url: http://git.jankratochvil.net/?p=youtube-dl.git;a=commitdiff_plain;h=a05d2a0c05b553bf2f5dec78aade0bf4733e9852;hp=348486ced4832e4de28c1eb024ef5d4f9c5e6fa5 Merge branch 'master' of github.com:rg3/youtube-dl --- diff --git a/youtube_dl/__init__.py b/youtube_dl/__init__.py index 042b852..fe0fe98 100755 --- a/youtube_dl/__init__.py +++ b/youtube_dl/__init__.py @@ -282,6 +282,14 @@ def _simplify_title(title): expr = re.compile(ur'[^\w\d_\-]+', flags=re.UNICODE) return expr.sub(u'_', title).strip(u'_') +def _orderedSet(iterable): + """ Remove all duplicates from the input iterable """ + res = [] + for el in iterable: + if el not in res: + res.append(el) + return res + class DownloadError(Exception): """Download Error exception. @@ -3744,6 +3752,124 @@ class MixcloudIE(InfoExtractor): except UnavailableVideoError, err: self._downloader.trouble(u'ERROR: unable to download file') +class StanfordOpenClassroomIE(InfoExtractor): + """Information extractor for Stanford's Open ClassRoom""" + + _VALID_URL = r'^(?:https?://)?openclassroom.stanford.edu(?P/?|(/MainFolder/(?:HomePage|CoursePage|VideoPage)\.php([?]course=(?P[^&]+)(&video=(?P