[FetLife] Add new extractor - Error raised if no login provided.
This commit is contained in:
parent
1c0a5f8802
commit
377a2b96dd
@ -35,8 +35,8 @@ class FetLifeIE(JWPlatformBaseIE):
|
|||||||
|
|
||||||
def _real_initialize(self):
|
def _real_initialize(self):
|
||||||
(username, password) = self._get_login_info()
|
(username, password) = self._get_login_info()
|
||||||
if username is None:
|
if (username is None) or (password is None):
|
||||||
return
|
raise ExtractorError('No login provided.', expected=True)
|
||||||
webpage = self._download_webpage(self._LOGIN_URL, 'login')
|
webpage = self._download_webpage(self._LOGIN_URL, 'login')
|
||||||
authenticity_token = self._search_regex(r'<input[^>]*?authenticity_token[^>]*?value=\"([^\"]*)\"[^>]/>', webpage, 'authenticity_token')
|
authenticity_token = self._search_regex(r'<input[^>]*?authenticity_token[^>]*?value=\"([^\"]*)\"[^>]/>', webpage, 'authenticity_token')
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user