Merge f7ca7e77be69b7028d68b92332d6de499d528601 into da7223d4aa42ff9fc680b0951d043dd03cec2d30

This commit is contained in:
epsilonSpider 2025-03-22 07:22:18 +08:00 committed by GitHub
commit 6bda621f65
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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