diff options
author | bashonly <88596187+bashonly@users.noreply.github.com> | 2024-07-01 17:51:27 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-01 22:51:27 +0000 |
commit | 6aaf96a3d6e7d0d426e97e11a2fcf52fda00e733 (patch) | |
tree | 69672ff4be314bd55650fac1e9a97280cecd61e0 /yt_dlp/extractor/tubetugraz.py | |
parent | d4b99a233314bf31f9c842035ea9884673d5313a (diff) |
[cleanup] Misc (#10075)
Closes #10303
Authored by: bashonly, seproDev, jucor, c-basalt
Co-authored-by: sepro <4618135+seproDev@users.noreply.github.com>
Co-authored-by: Julien Cornebise <julien@cornebise.com>
Co-authored-by: c-basalt <117849907+c-basalt@users.noreply.github.com>
Diffstat (limited to 'yt_dlp/extractor/tubetugraz.py')
-rw-r--r-- | yt_dlp/extractor/tubetugraz.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/yt_dlp/extractor/tubetugraz.py b/yt_dlp/extractor/tubetugraz.py index e13375f0a..d5dbf007b 100644 --- a/yt_dlp/extractor/tubetugraz.py +++ b/yt_dlp/extractor/tubetugraz.py @@ -21,7 +21,7 @@ class TubeTuGrazBaseIE(InfoExtractor): 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 @@ class TubeTuGrazBaseIE(InfoExtractor): '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 @@ class TubeTuGrazBaseIE(InfoExtractor): 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({ |