|
|
|
@ -119,16 +119,16 @@ class DropoutIE(InfoExtractor):
|
|
|
|
|
|
|
|
|
|
def _real_extract(self, url):
|
|
|
|
|
display_id = self._match_id(url)
|
|
|
|
|
login_err, webpage = False, ''
|
|
|
|
|
try:
|
|
|
|
|
|
|
|
|
|
webpage = None
|
|
|
|
|
if self._get_cookies('https://www.dropout.tv').get('_session'):
|
|
|
|
|
webpage = self._download_webpage(url, display_id)
|
|
|
|
|
if not webpage or '<div id="watch-unauthorized"' in webpage:
|
|
|
|
|
login_err = self._login(display_id)
|
|
|
|
|
webpage = self._download_webpage(url, display_id)
|
|
|
|
|
finally:
|
|
|
|
|
if not login_err:
|
|
|
|
|
self._download_webpage('https://www.dropout.tv/logout', display_id, note='Logging out', fatal=False)
|
|
|
|
|
elif '<div id="watch-unauthorized"' in webpage:
|
|
|
|
|
if login_err and '<div id="watch-unauthorized"' in webpage:
|
|
|
|
|
if login_err is True:
|
|
|
|
|
self.raise_login_required(method='password')
|
|
|
|
|
self.raise_login_required(method='any')
|
|
|
|
|
raise ExtractorError(login_err, expected=True)
|
|
|
|
|
|
|
|
|
|
embed_url = self._search_regex(r'embed_url:\s*["\'](.+?)["\']', webpage, 'embed url')
|
|
|
|
|