- title = re.search(",kw:\"(.+)\"",webpage)
- if title is None:
- title = re.search(",kw: \'(.+)\'",webpage)
- title = title.group(1)
- thumbnail_url = re.search(",pic: \'(.+?)\'",webpage)
- if thumbnail_url is None:
- thumbnail_url = re.search(",pic:\"(.+?)\"",webpage)
- thumbnail_url = thumbnail_url.group(1)
+
+ m = re.search(r'vcode:\s*[\'"](.+?)[\'"]', webpage)
+ if m and m.group(1):
+ return {
+ '_type': 'url',
+ 'url': u'youku:' + m.group(1),
+ 'ie_key': 'Youku'
+ }
+
+ title = self._search_regex(
+ r",kw:\s*['\"](.+?)[\"']", webpage, u'title')
+ thumbnail_url = self._search_regex(
+ r",pic:\s*[\"'](.+?)[\"']", webpage, u'thumbnail URL', fatal=False)