[adobepass] add IE suffix to the extractor and remove duplicate constant

This commit is contained in:
Remita Amine 2016-08-15 21:36:34 +01:00
parent cbef4d5c9f
commit 818ac213eb
6 changed files with 12 additions and 13 deletions

View File

@ -13,7 +13,7 @@
)
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'

View 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 @@
)
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',

View File

@ -3,7 +3,7 @@
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 @@ def _real_extract(self, url):
}
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 @@ def _real_extract(self, url):
}
class NationalGeographicEpisodeGuideIE(ThePlatformIE):
class NationalGeographicEpisodeGuideIE(InfoExtractor):
IE_NAME = 'natgeo:episodeguide'
_VALID_URL = r'https?://channel\.nationalgeographic\.com/(?:wild/)?(?P<id>[^/]+)/episode-guide'
_TESTS = [

View 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',

View File

@ -9,7 +9,7 @@
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 @@ def _extract_theplatform_metadata(self, path, video_id):
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):

View File

@ -5,7 +5,7 @@
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 @@
)
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',