mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-21 20:46:36 -05:00
[udemy] Fix authentication for localized layout (Closes #9594)
This commit is contained in:
parent
de7d76af52
commit
807cf7b07f
1 changed files with 3 additions and 1 deletions
|
@ -142,7 +142,9 @@ def _login(self):
|
||||||
self._LOGIN_URL, None, 'Downloading login popup')
|
self._LOGIN_URL, None, 'Downloading login popup')
|
||||||
|
|
||||||
def is_logged(webpage):
|
def is_logged(webpage):
|
||||||
return any(p in webpage for p in ['href="https://www.udemy.com/user/logout/', '>Logout<'])
|
return any(re.search(p, webpage) for p in (
|
||||||
|
r'href=["\'](?:https://www\.udemy\.com)?/user/logout/',
|
||||||
|
r'>Logout<'))
|
||||||
|
|
||||||
# already logged in
|
# already logged in
|
||||||
if is_logged(login_popup):
|
if is_logged(login_popup):
|
||||||
|
|
Loading…
Reference in a new issue