aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2015-11-21 21:37:29 +0600
committerSergey M․ <dstftw@gmail.com>2015-11-21 21:37:29 +0600
commit563772eda4a42b1fce1f3740fe91bf74e63bd347 (patch)
treeb0f14239d5a0e792b6ee69496acc0a6794e60307
parent0533915aad95d76b6bf4f529d39167f22a7c4b90 (diff)
downloadyoutube-dl-563772eda4a42b1fce1f3740fe91bf74e63bd347.tar.xz
[pluralsight] Extract base class
-rw-r--r--youtube_dl/extractor/pluralsight.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/youtube_dl/extractor/pluralsight.py b/youtube_dl/extractor/pluralsight.py
index fe6850aac..de7dc739b 100644
--- a/youtube_dl/extractor/pluralsight.py
+++ b/youtube_dl/extractor/pluralsight.py
@@ -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'
_VALID_URL = r'https?://(?:(?:www|app)\.)?pluralsight\.com/training/player\?'
_LOGIN_URL = 'https://app.pluralsight.com/id/'
- _API_BASE = 'http://app.pluralsight.com'
+
_NETRC_MACHINE = 'pluralsight'
_TESTS = [{
@@ -174,7 +178,7 @@ class PluralsightIE(InfoExtractor):
}
-class PluralsightCourseIE(InfoExtractor):
+class PluralsightCourseIE(PluralsightBaseIE):
IE_NAME = 'pluralsight:course'
_VALID_URL = r'https?://(?:(?:www|app)\.)?pluralsight\.com/(?:library/)?courses/(?P<id>[^/]+)'
_TESTS = [{