mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2025-08-20 21:34:01 -07:00
Merge f7ca7e77be
into c052a16f72
This commit is contained in:
commit
1e7b87cd06
1 changed files with 5 additions and 1 deletions
|
@ -38,7 +38,11 @@ class SafariBaseIE(InfoExtractor):
|
||||||
'Downloading login page')
|
'Downloading login page')
|
||||||
|
|
||||||
def is_logged(urlh):
|
def is_logged(urlh):
|
||||||
return 'learning.oreilly.com/home/' in urlh.geturl()
|
url = urlh.geturl()
|
||||||
|
parsed_url = compat_urlparse.urlparse(url)
|
||||||
|
return parsed_url.hostname.endswith('learning.oreilly.com') and (
|
||||||
|
parsed_url.path.startswith('/home/')
|
||||||
|
or (parsed_url.path == '/member/login/' and not parsed_url.query))
|
||||||
|
|
||||||
if is_logged(urlh):
|
if is_logged(urlh):
|
||||||
self.LOGGED_IN = True
|
self.LOGGED_IN = True
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue