cognito and vier coding guidelines update
This commit is contained in:
parent
efc2dbd3a5
commit
1430955192
@ -1,14 +1,13 @@
|
||||
from .common import InfoExtractor
|
||||
from ..utils import ExtractorError
|
||||
|
||||
class CognitoBaseIE(InfoExtractor):
|
||||
|
||||
class CognitoBaseIE(InfoExtractor):
|
||||
|
||||
def _cognito_login(self, auth_data):
|
||||
|
||||
try:
|
||||
import boto3
|
||||
from warrant import Cognito
|
||||
from warrant.aws_srp import AWSSRP
|
||||
except ImportError:
|
||||
raise ExtractorError('%s depends on boto3 and warrant.' % self.IE_NAME)
|
||||
|
@ -13,6 +13,7 @@ from ..utils import (
|
||||
|
||||
from .cognito import CognitoBaseIE
|
||||
|
||||
|
||||
class VierVijfKijkOnlineIE(CognitoBaseIE):
|
||||
IE_NAME = 'viervijfkijkonline'
|
||||
IE_DESC = 'vier.be and vijf.be - Kijk Online'
|
||||
@ -39,7 +40,6 @@ class VierVijfKijkOnlineIE(CognitoBaseIE):
|
||||
_POOL_ID = 'eu-west-1_dViSsKM5Y'
|
||||
_CLIENT_ID = '6s1h851s8uplco5h6mqh1jac8m'
|
||||
|
||||
|
||||
def _real_initialize(self):
|
||||
self._logged_in = False
|
||||
self.id_token = ''
|
||||
@ -62,9 +62,6 @@ class VierVijfKijkOnlineIE(CognitoBaseIE):
|
||||
self._logged_in = True
|
||||
|
||||
def _real_extract(self, url):
|
||||
mobj = re.match(self._VALID_URL, url)
|
||||
site = mobj.group('site')
|
||||
|
||||
if not self._logged_in:
|
||||
self._login()
|
||||
|
||||
@ -111,6 +108,7 @@ class VierVijfKijkOnlineIE(CognitoBaseIE):
|
||||
'formats': formats,
|
||||
}
|
||||
|
||||
|
||||
class VierIE(InfoExtractor):
|
||||
IE_NAME = 'vier'
|
||||
IE_DESC = 'vier.be and vijf.be'
|
||||
@ -295,6 +293,7 @@ class VierIE(InfoExtractor):
|
||||
'formats': formats,
|
||||
}
|
||||
|
||||
|
||||
class VierVideosIE(InfoExtractor):
|
||||
IE_NAME = 'vier:videos'
|
||||
_VALID_URL = r'https?://(?:www\.)?(?P<site>vier|vijf)\.be/(?P<program>[^/]+)/videos(?:\?.*\bpage=(?P<page>\d+)|$)'
|
||||
|
Loading…
x
Reference in New Issue
Block a user