From 6bd79800c3c5d3a91561ee34a87dbaa9e8319ae9 Mon Sep 17 00:00:00 2001 From: Unknown Date: Wed, 11 Nov 2020 15:05:18 +0100 Subject: [PATCH 1/3] [youtube] python2 fix #168 proposed fix by awei78 --- youtube_dlc/extractor/youtube.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/youtube_dlc/extractor/youtube.py b/youtube_dlc/extractor/youtube.py index d5d25859d..629a82c97 100644 --- a/youtube_dlc/extractor/youtube.py +++ b/youtube_dlc/extractor/youtube.py @@ -371,10 +371,10 @@ def _entries(self, page, playlist_id, max_pages=None): query={ 'key': try_get(yt_conf, lambda x: x['INNERTUBE_API_KEY']) }, - data=bytes(json.dumps({ + data= str(json.dumps({ 'context': try_get(yt_conf, lambda x: x['INNERTUBE_CONTEXT']), 'continuation': continuation_token - }), encoding='utf-8'), + })).encode(encoding='UTF-8',errors='strict'), headers={ 'Content-Type': 'application/json' } From c297a6c6619989f15b41935e49addff1d27e4e41 Mon Sep 17 00:00:00 2001 From: Tom-Oliver Heidel Date: Wed, 11 Nov 2020 15:08:12 +0100 Subject: [PATCH 2/3] [skip travis] --- youtube_dlc/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube_dlc/version.py b/youtube_dlc/version.py index 3c68ae5eb..201a981cf 100644 --- a/youtube_dlc/version.py +++ b/youtube_dlc/version.py @@ -1,3 +1,3 @@ from __future__ import unicode_literals -__version__ = '2020.11.11-1' +__version__ = '2020.11.11-2' From 5e6cdcecdd1ac74592f27766ef38a3ae059d4ae7 Mon Sep 17 00:00:00 2001 From: Unknown Date: Wed, 11 Nov 2020 15:15:24 +0100 Subject: [PATCH 3/3] flake8 yt py2 fix --- youtube_dlc/extractor/youtube.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/youtube_dlc/extractor/youtube.py b/youtube_dlc/extractor/youtube.py index 629a82c97..97cc793f9 100644 --- a/youtube_dlc/extractor/youtube.py +++ b/youtube_dlc/extractor/youtube.py @@ -371,10 +371,10 @@ def _entries(self, page, playlist_id, max_pages=None): query={ 'key': try_get(yt_conf, lambda x: x['INNERTUBE_API_KEY']) }, - data= str(json.dumps({ + data=str(json.dumps({ 'context': try_get(yt_conf, lambda x: x['INNERTUBE_CONTEXT']), 'continuation': continuation_token - })).encode(encoding='UTF-8',errors='strict'), + })).encode(encoding='UTF-8', errors='strict'), headers={ 'Content-Type': 'application/json' }