1
0
mirror of https://github.com/yt-dlp/yt-dlp synced 2025-12-20 16:15:41 +07:00

Revert "pull changes from remote master (#190)" (#193)

This reverts commit b827ee921f.
This commit is contained in:
Aakash Gajjar
2020-08-26 20:22:32 +05:30
committed by GitHub
parent 7f7edf837c
commit 19a107f21c
134 changed files with 2623 additions and 4150 deletions

View File

@@ -8,6 +8,7 @@
from ..compat import (
compat_parse_qs,
compat_str,
compat_urlparse,
)
from ..utils import (
@@ -38,13 +39,13 @@ def _login(self):
'Downloading login page')
def is_logged(urlh):
return 'learning.oreilly.com/home/' in urlh.geturl()
return 'learning.oreilly.com/home/' in compat_str(urlh.geturl())
if is_logged(urlh):
self.LOGGED_IN = True
return
redirect_url = urlh.geturl()
redirect_url = compat_str(urlh.geturl())
parsed_url = compat_urlparse.urlparse(redirect_url)
qs = compat_parse_qs(parsed_url.query)
next_uri = compat_urlparse.urljoin(
@@ -164,8 +165,7 @@ def _real_extract(self, url):
kaltura_session = self._download_json(
'%s/player/kaltura_session/?reference_id=%s' % (self._API_BASE, reference_id),
video_id, 'Downloading kaltura session JSON',
'Unable to download kaltura session JSON', fatal=False,
headers={'Accept': 'application/json'})
'Unable to download kaltura session JSON', fatal=False)
if kaltura_session:
session = kaltura_session.get('session')
if session: