]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
[adobepass] add IE suffix to the extractor and remove duplicate constant
authorRemita Amine <remitamine@gmail.com>
Mon, 15 Aug 2016 20:36:34 +0000 (21:36 +0100)
committerRemita Amine <remitamine@gmail.com>
Mon, 15 Aug 2016 20:36:34 +0000 (21:36 +0100)
youtube_dl/extractor/adobepass.py
youtube_dl/extractor/fxnetworks.py
youtube_dl/extractor/nationalgeographic.py
youtube_dl/extractor/syfy.py
youtube_dl/extractor/theplatform.py
youtube_dl/extractor/viceland.py

index cf3a15cbb1b1d997fdc9f33e48de7561c5b06856..2c9f8817b3f703f098f0a31189fd8ce8b2d44042 100644 (file)
@@ -13,7 +13,7 @@ from ..utils import (
 )
 
 
-class AdobePass(InfoExtractor):
+class AdobePassIE(InfoExtractor):
     _SERVICE_PROVIDER_TEMPLATE = 'https://sp.auth.adobe.com/adobe-services/%s'
     _USER_AGENT = 'Mozilla/5.0 (X11; Linux i686; rv:47.0) Gecko/20100101 Firefox/47.0'
 
index 940e7427c06d8a40ab464aa72675082eff0f4db1..3ec3b0b4604822cb3bcfd5cadfbc6ebb3c27a0b3 100644 (file)
@@ -1,7 +1,7 @@
 # coding: utf-8
 from __future__ import unicode_literals
 
-from .adobepass import AdobePass
+from .adobepass import AdobePassIE
 from ..utils import (
     update_url_query,
     extract_attributes,
@@ -10,7 +10,7 @@ from ..utils import (
 )
 
 
-class FXNetworksIE(AdobePass):
+class FXNetworksIE(AdobePassIE):
     _VALID_URL = r'https?://(?:www\.)?fxnetworks\.com/video/(?P<id>\d+)'
     _TEST = {
         'url': 'http://www.fxnetworks.com/video/719841347694',
index 890e8d5bcea3b869217f337f95de1ac69e4b85e7..1dcf27afef331ceb3b09d6ade66cde65e92e3cd6 100644 (file)
@@ -3,7 +3,7 @@ from __future__ import unicode_literals
 import re
 
 from .common import InfoExtractor
-from .theplatform import ThePlatformIE
+from .adobepass import AdobePassIE
 from ..utils import (
     smuggle_url,
     url_basename,
@@ -65,7 +65,7 @@ class NationalGeographicVideoIE(InfoExtractor):
         }
 
 
-class NationalGeographicIE(ThePlatformIE):
+class NationalGeographicIE(AdobePassIE):
     IE_NAME = 'natgeo'
     _VALID_URL = r'https?://channel\.nationalgeographic\.com/(?:wild/)?[^/]+/(?:videos|episodes)/(?P<id>[^/?]+)'
 
@@ -131,7 +131,7 @@ class NationalGeographicIE(ThePlatformIE):
         }
 
 
-class NationalGeographicEpisodeGuideIE(ThePlatformIE):
+class NationalGeographicEpisodeGuideIE(InfoExtractor):
     IE_NAME = 'natgeo:episodeguide'
     _VALID_URL = r'https?://channel\.nationalgeographic\.com/(?:wild/)?(?P<id>[^/]+)/episode-guide'
     _TESTS = [
index 764287a64a26b07f0e936de634e96b47f6cada2e..cc81f60036794da7ba9f0f3f584e632aefb557ee 100644 (file)
@@ -1,13 +1,13 @@
 from __future__ import unicode_literals
 
-from .theplatform import ThePlatformIE
+from .adobepass import AdobePassIE
 from ..utils import (
     update_url_query,
     smuggle_url,
 )
 
 
-class SyfyIE(ThePlatformIE):
+class SyfyIE(AdobePassIE):
     _VALID_URL = r'https?://www\.syfy\.com/(?:[^/]+/)?videos/(?P<id>[^/?#]+)'
     _TESTS = [{
         'url': 'http://www.syfy.com/theinternetruinedmylife/videos/the-internet-ruined-my-life-season-1-trailer',
index 108ddd3a9e76b041e6d770d77f79c2ce3568d637..eda899497952fe93a0de380d13b0f6951856ee9a 100644 (file)
@@ -9,7 +9,7 @@ import hashlib
 
 
 from .once import OnceIE
-from .adobepass import AdobePass
+from .adobepass import AdobePassIE
 from ..compat import (
     compat_parse_qs,
     compat_urllib_parse_urlparse,
@@ -93,7 +93,7 @@ class ThePlatformBaseIE(OnceIE):
         return self._parse_theplatform_metadata(info)
 
 
-class ThePlatformIE(ThePlatformBaseIE, AdobePass):
+class ThePlatformIE(ThePlatformBaseIE, AdobePassIE):
     _VALID_URL = r'''(?x)
         (?:https?://(?:link|player)\.theplatform\.com/[sp]/(?P<provider_id>[^/]+)/
            (?:(?:(?:[^/]+/)+select/)?(?P<media>media/(?:guid/\d+/)?)|(?P<config>(?:[^/\?]+/(?:swf|config)|onsite)/select/))?
@@ -164,7 +164,6 @@ class ThePlatformIE(ThePlatformBaseIE, AdobePass):
         'url': 'http://player.theplatform.com/p/NnzsPC/onsite_universal/select/media/guid/2410887629/2928790?fwsitesection=nbc_the_blacklist_video_library&autoPlay=true&carouselID=137781',
         'only_matching': True,
     }]
-    _SERVICE_PROVIDER_TEMPLATE = 'https://sp.auth.adobe.com/adobe-services/%s'
 
     @classmethod
     def _extract_urls(cls, webpage):
index da766d8dbb1db043ee5b2bc25745a9a29ff4bd35..8742b607a4a8dcbbf6b2790fa40ca29353b04de2 100644 (file)
@@ -5,7 +5,7 @@ import time
 import hashlib
 import json
 
-from .adobepass import AdobePass
+from .adobepass import AdobePassIE
 from ..compat import compat_HTTPError
 from ..utils import (
     int_or_none,
@@ -17,7 +17,7 @@ from ..utils import (
 )
 
 
-class VicelandIE(AdobePass):
+class VicelandIE(AdobePassIE):
     _VALID_URL = r'https?://(?:www\.)?viceland\.com/[^/]+/video/[^/]+/(?P<id>[a-f0-9]+)'
     _TEST = {
         'url': 'https://www.viceland.com/en_us/video/cyberwar-trailer/57608447973ee7705f6fbd4e',