Skip to content

Commit

Permalink
[bot] AutoMerging: merge all upstream's changes:
Browse files Browse the repository at this point in the history
* https://github.com/ytdl-org/youtube-dl:
  [youtube] prioritize information from YoutubeIE for playlist entries(closes ytdl-org#28619, closes ytdl-org#28636)
  [extractor/common] fix _get_cookies method for python 2(ytdl-org#20673, ytdl-org#23256, ytdl-org#20326, closes ytdl-org#28640)
  • Loading branch information
github-actions[bot] committed Apr 3, 2021
2 parents 0d1163e + 654b4f4 commit 5dd4f94
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion youtube_dl/extractor/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -2899,7 +2899,10 @@ def _get_cookies(self, url):
""" Return a compat_cookies.SimpleCookie with the cookies for the url """
req = sanitized_Request(url)
self._downloader.cookiejar.add_cookie_header(req)
return compat_cookies.SimpleCookie(req.get_header('Cookie'))
cookie = req.get_header('Cookie')
if cookie and sys.version_info[0] == 2:
cookie = str(cookie)
return compat_cookies.SimpleCookie(cookie)

def _apply_first_set_cookie_header(self, url_handle, cookie):
"""
Expand Down
2 changes: 1 addition & 1 deletion youtube_dl/extractor/youtube.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ def _extract_video(self, renderer):
(lambda x: x['ownerText']['runs'][0]['text'],
lambda x: x['shortBylineText']['runs'][0]['text']), compat_str)
return {
'_type': 'url_transparent',
'_type': 'url',
'ie_key': YoutubeIE.ie_key(),
'id': video_id,
'url': video_id,
Expand Down

0 comments on commit 5dd4f94

Please sign in to comment.