Skip to content

Commit

Permalink
use older login method(closes #11572)
Browse files Browse the repository at this point in the history
  • Loading branch information
remitamine committed Nov 8, 2017
1 parent f34b841 commit cc6a960
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions youtube_dl/extractor/crunchyroll.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,17 @@ def _login(self):
if username is None:
return

self._download_webpage(
'https://www.crunchyroll.com/?a=formhandler',
None, 'Logging in', 'Wrong login info',
data=urlencode_postdata({
'formname': 'RpcApiUser_Login',
'next_url': 'https://www.crunchyroll.com/acct/membership',
'name': username,
'password': password,
}))

'''
login_page = self._download_webpage(
self._LOGIN_URL, None, 'Downloading login page')
Expand Down Expand Up @@ -86,6 +97,7 @@ def is_logged(webpage):
raise ExtractorError('Unable to login: %s' % error, expected=True)
raise ExtractorError('Unable to log in')
'''

def _real_initialize(self):
self._login()
Expand Down

0 comments on commit cc6a960

Please sign in to comment.