From 4abf2778f4ad2f8610a51314c59f36552c713c9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaime=20Marqui=CC=81nez=20Ferra=CC=81ndiz?= Date: Wed, 6 Nov 2013 21:47:02 +0100 Subject: [PATCH] [kankan] Fix the video url It now requires two additional parameters, one is a timestamp we get from the getCdnresource_flv page and the other is a key, it seems to only work for a specific User-Agent. It seems to be valid for different videos. --- youtube_dl/extractor/kankan.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/youtube_dl/extractor/kankan.py b/youtube_dl/extractor/kankan.py index 445d46501..f00917f5e 100644 --- a/youtube_dl/extractor/kankan.py +++ b/youtube_dl/extractor/kankan.py @@ -30,10 +30,11 @@ class KankanIE(InfoExtractor): video_id, u'Downloading video url info') ip = self._search_regex(r'ip:"(.+?)"', video_info_page, u'video url ip') path = self._search_regex(r'path:"(.+?)"', video_info_page, u'video url path') - video_url = 'http://%s%s' % (ip, path) + video_url = 'http://%s%s?key=fb2dcb4b14401eae04986d42011ae4d4&key1=1383767293' % (ip, path) return {'id': video_id, 'title': title, 'url': video_url, 'ext': determine_ext(video_url), + 'user_agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.101 Safari/537.36' }