- def account_data(field):
- return try_get(video, lambda x: x['account'][field], compat_str)
+ video_description = self._download_json(
+ 'https://%s/api/v1/videos/%s/description' % (host, video_id), video_id, fatal=False)
+
+ description = None
+ if isinstance(video_description, dict):
+ description = str_or_none(video_description.get('description'))
+
+ subtitles = self.extract_subtitles(host, video_id)
+
+ def data(section, field, type_):
+ return try_get(video, lambda x: x[section][field], type_)
+
+ def account_data(field, type_):
+ return data('account', field, type_)
+
+ def channel_data(field, type_):
+ return data('channel', field, type_)