From ab410f74763089495af7ed21c7efae0c46b880e1 Mon Sep 17 00:00:00 2001 From: Abhishek Kedia Date: Sun, 20 Dec 2015 22:25:33 +0100 Subject: [PATCH] remove unnecessary redirect url retrieval. test with `python -m youtube_dl https://genvideos.org/watch?v=Pitch_Perfect_2_2015` working fine. --- youtube_dl/extractor/genvideos.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/youtube_dl/extractor/genvideos.py b/youtube_dl/extractor/genvideos.py index 7498e39e7..e5ec20c7a 100644 --- a/youtube_dl/extractor/genvideos.py +++ b/youtube_dl/extractor/genvideos.py @@ -52,8 +52,8 @@ class GenVideosIE(InfoExtractor): ) #returns json containing the url of the video (in 360p, 720p and 1080p). #For example - {"360":"\/\/html5player.org\/embed?url=https%3A%2F%2Flh3.googleusercontent.com%2FW6-SNGaDLWNyucD3pMqa1uMBapGDbtMTOtwpXrEu-w%3Dm18","720":"\/\/html5player.org\/embed?url=https%3A%2F%2Flh3.googleusercontent.com%2FW6-SNGaDLWNyucD3pMqa1uMBapGDbtMTOtwpXrEu-w%3Dm22","1080":"\/\/html5player.org\/embed?url=https%3A%2F%2Flh3.googleusercontent.com%2FW6-SNGaDLWNyucD3pMqa1uMBapGDbtMTOtwpXrEu-w%3Dm37"} urls_data_json = json.loads(urls_data.text) - _360p_redirect_url = parse_qs(urlparse(urls_data_json['360']).query)['url'][0] - _360p_url = urllib.urlopen(_360p_redirect_url).geturl() + _360p_url = parse_qs(urlparse(urls_data_json['360']).query)['url'][0] + #_360p_url = urllib.urlopen(_360p_redirect_url).geturl() # TODO : return all possible formats instead of just 360p