aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUnknown <blackjack4494@web.de>2020-10-07 04:54:38 +0200
committerUnknown <blackjack4494@web.de>2020-10-07 04:54:38 +0200
commitc73baf23e0e9e9b8197523b70859a57f12aab6ad (patch)
tree293aa7d1662d8bcf30b3f11d4a1b710fc65d2b5a
parent4bb9c8802e85211b67250fca726f3403ffc9be5e (diff)
downloadhypervideo-pre-c73baf23e0e9e9b8197523b70859a57f12aab6ad.tar.lz
hypervideo-pre-c73baf23e0e9e9b8197523b70859a57f12aab6ad.tar.xz
hypervideo-pre-c73baf23e0e9e9b8197523b70859a57f12aab6ad.zip
fix to support python 2.6
-rw-r--r--youtube_dlc/extractor/youtube.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/youtube_dlc/extractor/youtube.py b/youtube_dlc/extractor/youtube.py
index 8c7e57b29..293d6069d 100644
--- a/youtube_dlc/extractor/youtube.py
+++ b/youtube_dlc/extractor/youtube.py
@@ -1869,8 +1869,13 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
embed_webpage = self._download_webpage(url, video_id, 'Downloading embed webpage')
# check if video is only playable on youtube - if so it requires auth (cookies)
if re.search(r'player-unavailable">', embed_webpage) is not None:
+ '''
+ # TODO apply this patch when Support for Python 2.6(!) and above drops
if ({'VISITOR_INFO1_LIVE', 'HSID', 'SSID', 'SID'} <= cookie_keys
or {'VISITOR_INFO1_LIVE', '__Secure-3PSID', 'LOGIN_INFO'} <= cookie_keys):
+ '''
+ if (set(('VISITOR_INFO1_LIVE', 'HSID', 'SSID', 'SID')) <= set(cookie_keys)
+ or set(('VISITOR_INFO1_LIVE', '__Secure-3PSID', 'LOGIN_INFO')) <= set(cookie_keys)):
age_gate = False
# Try looking directly into the video webpage
ytplayer_config = self._get_ytplayer_config(video_id, video_webpage)