+# coding: utf-8
from __future__ import unicode_literals
-import re
-
from .common import InfoExtractor
'info_dict': {
'id': 'NODfbab',
'ext': 'mp4',
- 'title': 'test chars: "\'/\\ä<>This is a test video for youtube-dl.For more information, contact phihag@phihag.de . - Video - Videos on Keek',
- 'description': 'test chars: "\'/\\ä<>This is a test video for youtube-dl.For more information, contact phihag@phihag.de .',
+ 'title': 'md5:35d42050a3ece241d5ddd7fdcc6fd896',
'uploader': 'ytdl',
'uploader_id': 'eGT5bab',
},
video_id = self._match_id(url)
webpage = self._download_webpage(url, video_id)
- uploader = uploader_id = None
- matches = re.search(r'data-username="(?P<uploader>[^"]+)"[^>]*data-user-id="(?P<uploader_id>[^"]+)"', webpage)
- if matches:
- uploader, uploader_id = matches.groups()
return {
'id': video_id,
'url': self._og_search_video_url(webpage),
'ext': 'mp4',
- 'title': self._og_search_title(webpage),
- 'description': self._og_search_description(webpage),
+ 'title': self._og_search_description(webpage).strip(),
'thumbnail': self._og_search_thumbnail(webpage),
- 'uploader': uploader,
- 'uploader_id': uploader_id,
+ 'uploader': self._search_regex(
+ r'data-username=(["\'])(?P<uploader>.+?)\1', webpage,
+ 'uploader', fatal=False, group='uploader'),
+ 'uploader_id': self._search_regex(
+ r'data-user-id=(["\'])(?P<uploader_id>.+?)\1', webpage,
+ 'uploader id', fatal=False, group='uploader_id'),
}