webpage = self._download_webpage(self._LOGIN_URL, None)
form = self._search_regex(
r'(?s)<form[^>]+action="/account/login"[^>]*>(.+?)</form>',
- webpage, 'login form')
+ webpage, 'login form', default=None)
+ if not form: # logged in
+ return
data = self._hidden_inputs(form)
data.update({
'Email': username,