- return [{
- 'id': video_id,
- 'url': video_url,
- 'uploader': video_uploader,
- 'upload_date': video_upload_date,
- 'title': self._og_search_title(webpage),
- 'ext': video_extension,
- 'subtitles': video_subtitles,
- 'thumbnail': info['thumbnail_url']
- }]
-
- def _get_available_subtitles(self, video_id):
+ view_count = str_to_int(self._search_regex(
+ r'video_views_count[^>]+>\s+([\d\.,]+)',
+ webpage, 'view count', fatal=False))
+
+ title = self._og_search_title(webpage, default=None)
+ if title is None:
+ title = self._html_search_regex(
+ r'(?s)<span\s+id="video_title"[^>]*>(.*?)</span>', webpage,
+ 'title')
+
+ return {
+ 'id': video_id,
+ 'formats': formats,
+ 'uploader': info['owner.screenname'],
+ 'upload_date': video_upload_date,
+ 'title': title,
+ 'subtitles': video_subtitles,
+ 'thumbnail': info['thumbnail_url'],
+ 'age_limit': age_limit,
+ 'view_count': view_count,
+ }
+
+ def _get_available_subtitles(self, video_id, webpage):