Browse Source

[udemy] Fix authentication for localized layout (Closes #9594)

totalwebcasting
Sergey M․ 8 years ago
parent
commit
807cf7b07f
No known key found for this signature in database GPG Key ID: 2C393E0F18A9236D
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      youtube_dl/extractor/udemy.py

+ 3
- 1
youtube_dl/extractor/udemy.py View File

@ -142,7 +142,9 @@ class UdemyIE(InfoExtractor):
self._LOGIN_URL, None, 'Downloading login popup')
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
if is_logged(login_popup):


Loading…
Cancel
Save