Browse Source

[pluralsight] Extract base class

totalwebcasting
Sergey M․ 9 years ago
parent
commit
563772eda4
1 changed files with 7 additions and 3 deletions
  1. +7
    -3
      youtube_dl/extractor/pluralsight.py

+ 7
- 3
youtube_dl/extractor/pluralsight.py View File

@ -16,11 +16,15 @@ from ..utils import (
) )
class PluralsightIE(InfoExtractor):
class PluralsightBaseIE(InfoExtractor):
_API_BASE = 'http://app.pluralsight.com'
class PluralsightIE(PluralsightBaseIE):
IE_NAME = 'pluralsight' IE_NAME = 'pluralsight'
_VALID_URL = r'https?://(?:(?:www|app)\.)?pluralsight\.com/training/player\?' _VALID_URL = r'https?://(?:(?:www|app)\.)?pluralsight\.com/training/player\?'
_LOGIN_URL = 'https://app.pluralsight.com/id/' _LOGIN_URL = 'https://app.pluralsight.com/id/'
_API_BASE = 'http://app.pluralsight.com'
_NETRC_MACHINE = 'pluralsight' _NETRC_MACHINE = 'pluralsight'
_TESTS = [{ _TESTS = [{
@ -174,7 +178,7 @@ class PluralsightIE(InfoExtractor):
} }
class PluralsightCourseIE(InfoExtractor):
class PluralsightCourseIE(PluralsightBaseIE):
IE_NAME = 'pluralsight:course' IE_NAME = 'pluralsight:course'
_VALID_URL = r'https?://(?:(?:www|app)\.)?pluralsight\.com/(?:library/)?courses/(?P<id>[^/]+)' _VALID_URL = r'https?://(?:(?:www|app)\.)?pluralsight\.com/(?:library/)?courses/(?P<id>[^/]+)'
_TESTS = [{ _TESTS = [{


Loading…
Cancel
Save