aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/kankan.py
diff options
context:
space:
mode:
authorhuohuarong <huohuarong@gmail.com>2013-08-02 15:26:11 +0800
committerhuohuarong <huohuarong@gmail.com>2013-08-02 15:26:11 +0800
commit6d3a7d03e14fcbc704bf30d305fb95c5829e55a6 (patch)
tree5ba4e4bfbf21558c011684572b1dae100933a522 /youtube_dl/extractor/kankan.py
parent9bb6d2f21de82179e4c90a874b7e7c519dbc6047 (diff)
fix bug: kankan extractor not support http://vod.kankan.com/v/70/70309.shtml
Diffstat (limited to 'youtube_dl/extractor/kankan.py')
-rw-r--r--youtube_dl/extractor/kankan.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/youtube_dl/extractor/kankan.py b/youtube_dl/extractor/kankan.py
index 8537ba584..445d46501 100644
--- a/youtube_dl/extractor/kankan.py
+++ b/youtube_dl/extractor/kankan.py
@@ -21,8 +21,10 @@ class KankanIE(InfoExtractor):
video_id = mobj.group('id')
webpage = self._download_webpage(url, video_id)
- title = self._search_regex(r'G_TITLE=[\'"](.+?)[\'"]', webpage, u'video title')
- gcid = self._search_regex(r'lurl:[\'"]http://.+?/.+?/(.+?)/', webpage, u'gcid')
+ title = self._search_regex(r'(?:G_TITLE=|G_MOVIE_TITLE = )[\'"](.+?)[\'"]', webpage, u'video title')
+ surls = re.search(r'surls:\[\'.+?\'\]|lurl:\'.+?\.flv\'', webpage).group(0)
+ gcids = re.findall(r"http://.+?/.+?/(.+?)/", surls)
+ gcid = gcids[-1]
video_info_page = self._download_webpage('http://p2s.cl.kankan.com/getCdnresource_flv?gcid=%s' % gcid,
video_id, u'Downloading video url info')