X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=youtube_dl%2Fextractor%2Fudemy.py;h=1a7d01c6790e0caa8c408c388ebc5922dc379889;hb=9e1a5b845586a0a5431fb72467142046d8571e6f;hp=35df918b879ced4b7f2d7e90f1e21d15479504ca;hpb=e5de3f6c89d2432a3afbc6d0545259ad49ee17a9;p=youtube-dl diff --git a/youtube_dl/extractor/udemy.py b/youtube_dl/extractor/udemy.py index 35df918b8..1a7d01c67 100644 --- a/youtube_dl/extractor/udemy.py +++ b/youtube_dl/extractor/udemy.py @@ -16,7 +16,7 @@ class UdemyIE(InfoExtractor): _LOGIN_URL = 'https://www.udemy.com/join/login-submit/' _NETRC_MACHINE = 'udemy' - _TEST = { + _TESTS = [{ 'url': 'https://www.udemy.com/java-tutorial/#/lecture/172757', 'md5': '98eda5b657e752cf945d8445e261b5c5', 'info_dict': { @@ -27,7 +27,7 @@ class UdemyIE(InfoExtractor): 'duration': 579.29, }, 'skip': 'Requires udemy account credentials', - } + }] def _handle_error(self, response): if not isinstance(response, dict): @@ -129,6 +129,7 @@ class UdemyCourseIE(UdemyIE): _VALID_URL = r'https?://www\.udemy\.com/(?P[\da-z-]+)' _SUCCESSFULLY_ENROLLED = '>You have enrolled in this course!<' _ALREADY_ENROLLED = '>You are already taking this course.<' + _TESTS = [] @classmethod def suitable(cls, url): @@ -153,11 +154,11 @@ class UdemyCourseIE(UdemyIE): self.to_screen('%s: Already enrolled in' % course_id) response = self._download_json('https://www.udemy.com/api-1.1/courses/%s/curriculum' % course_id, - course_id, 'Downloading course curriculum') + course_id, 'Downloading course curriculum') entries = [ self.url_result('https://www.udemy.com/%s/#/lecture/%s' % (course_path, asset['id']), 'Udemy') for asset in response if asset.get('assetType') == 'Video' ] - return self.playlist_result(entries, course_id, course_title) \ No newline at end of file + return self.playlist_result(entries, course_id, course_title)