+ def _real_initialize(self):
+ username, password = self._get_login_info()
+ if username is None:
+ return
+
+ code = self._download_json(
+ 'https://www.ufc.tv/secure/authenticate',
+ None, 'Logging in', data=urlencode_postdata({
+ 'username': username,
+ 'password': password,
+ 'format': 'json',
+ })).get('code')
+ if code and code != 'loginsuccess':
+ raise ExtractorError(code, expected=True)
+