|
|
@ -69,16 +69,17 @@ class NocoIE(InfoExtractor):
|
|
|
|
if username is None:
|
|
|
|
if username is None:
|
|
|
|
return
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
|
|
login_form = {
|
|
|
|
login = self._download_json(
|
|
|
|
'a': 'login',
|
|
|
|
self._LOGIN_URL, None, 'Logging in as %s' % username,
|
|
|
|
'cookie': '1',
|
|
|
|
data=urlencode_postdata({
|
|
|
|
'username': username,
|
|
|
|
'a': 'login',
|
|
|
|
'password': password,
|
|
|
|
'cookie': '1',
|
|
|
|
}
|
|
|
|
'username': username,
|
|
|
|
request = sanitized_Request(self._LOGIN_URL, urlencode_postdata(login_form))
|
|
|
|
'password': password,
|
|
|
|
request.add_header('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8')
|
|
|
|
}),
|
|
|
|
|
|
|
|
headers={
|
|
|
|
login = self._download_json(request, None, 'Logging in as %s' % username)
|
|
|
|
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
if 'erreur' in login:
|
|
|
|
if 'erreur' in login:
|
|
|
|
raise ExtractorError('Unable to login: %s' % clean_html(login['erreur']), expected=True)
|
|
|
|
raise ExtractorError('Unable to login: %s' % clean_html(login['erreur']), expected=True)
|
|
|
|