1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-20 01:42:50 +01:00

[ie/tubetugraz] Fix buggy _download_webpage_handle usage

Authored by: bashonly
This commit is contained in:
bashonly 2024-06-11 23:47:19 -05:00
parent 43c76d68c0
commit f6f1af31f5
No known key found for this signature in database
GPG Key ID: 783F096F253D15B0

View File

@ -21,7 +21,7 @@ def _perform_login(self, username, password):
if not urlh:
return
content, urlh = self._download_webpage_handle(
response = self._download_webpage_handle(
urlh.url, None, fatal=False, headers={'referer': urlh.url},
note='logging in', errnote='unable to log in',
data=urlencode_postdata({
@ -30,7 +30,11 @@ def _perform_login(self, username, password):
'j_username': username,
'j_password': password,
}))
if not urlh or urlh.url == 'https://tube.tugraz.at/paella/ui/index.html':
if not response:
return
content, urlh = response
if urlh.url == 'https://tube.tugraz.at/paella/ui/index.html':
return
if not self._html_search_regex(
@ -39,7 +43,7 @@ def _perform_login(self, username, password):
self.report_warning('unable to login: incorrect password')
return
content, urlh = self._download_webpage_handle(
urlh = self._request_webpage(
urlh.url, None, fatal=False, headers={'referer': urlh.url},
note='logging in with TFA', errnote='unable to log in with TFA',
data=urlencode_postdata({