diff options
author | Philipp Hagemeister <phihag@phihag.de> | 2013-08-28 13:10:59 +0200 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2013-08-28 13:10:59 +0200 |
commit | f8b362739e4f469b501aa804beb95cf1cfb1c916 (patch) | |
tree | dd1aa21fd756b8cb0239d325967cdf5393a37de8 /youtube_dl/extractor/kankan.py | |
parent | 6d69d03bac08f8381031de721167103697bf3fed (diff) | |
parent | d5b00ee6e0ba70fd5d87752e8772fc1c39e4bd59 (diff) | |
download | youtube-dl-f8b362739e4f469b501aa804beb95cf1cfb1c916.tar.xz |
Merge remote-tracking branch 'Huarong/master'
Diffstat (limited to 'youtube_dl/extractor/kankan.py')
-rw-r--r-- | youtube_dl/extractor/kankan.py | 6 |
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') |