1
0
mirror of https://github.com/l1ving/youtube-dl synced 2026-06-05 07:33:34 +08:00

[FetLife] Add new extractor - Error raised if no login provided.

This commit is contained in:
motophil
2017-01-21 17:35:59 +01:00
Unverified
parent 1c0a5f8802
commit 377a2b96dd
+2 -2
View File
@@ -35,8 +35,8 @@ class FetLifeIE(JWPlatformBaseIE):
def _real_initialize(self):
(username, password) = self._get_login_info()
if username is None:
return
if (username is None) or (password is None):
raise ExtractorError('No login provided.', expected=True)
webpage = self._download_webpage(self._LOGIN_URL, 'login')
authenticity_token = self._search_regex(r'<input[^>]*?authenticity_token[^>]*?value=\"([^\"]*)\"[^>]/>', webpage, 'authenticity_token')