aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2016-05-28 21:18:24 +0600
committerSergey M․ <dstftw@gmail.com>2016-05-28 21:18:24 +0600
commit807cf7b07f6ac1299f5578ea1264b43fc30d8301 (patch)
treeadd508dbd433a5172e08a5afcfeb24d9613e90c2 /youtube_dl
parentde7d76af52c6cb462dfab967d57f5fa7cd17df50 (diff)
[udemy] Fix authentication for localized layout (Closes #9594)
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/extractor/udemy.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/youtube_dl/extractor/udemy.py b/youtube_dl/extractor/udemy.py
index 13e0cd237..89b869559 100644
--- a/youtube_dl/extractor/udemy.py
+++ b/youtube_dl/extractor/udemy.py
@@ -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):