]> git.bitcoin.ninja Git - youtube-dl/commitdiff
[udemy] Fix authentication for localized layout (Closes #9594)
authorSergey M․ <dstftw@gmail.com>
Sat, 28 May 2016 15:18:24 +0000 (21:18 +0600)
committerSergey M․ <dstftw@gmail.com>
Sat, 28 May 2016 15:18:24 +0000 (21:18 +0600)
youtube_dl/extractor/udemy.py

index 13e0cd2374f9195f6de1675966ace21d0998b475..89b86955913587c3c09474fdffaab8ad338bb26a 100644 (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):