- data = self._download_json(
- 'http://videomore.ru/video/tracks/%s.json' % video_id,
- video_id, 'Downloading video JSON')
-
- title = data.get('title') or data['project_title']
- description = data.get('description') or data.get('description_raw')
- timestamp = parse_iso8601(data.get('published_at'))
- duration = int_or_none(data.get('duration'))
- view_count = int_or_none(data.get('views'))
- age_limit = parse_age_limit(data.get('min_age'))
- thumbnails = [{
- 'url': thumbnail,
- } for thumbnail in data.get('big_thumbnail_urls', [])]
-
- series = data.get('project_title')
- episode = data.get('title')
- episode_number = int_or_none(data.get('episode_of_season') or None)
- season = data.get('season_title')
- season_number = int_or_none(data.get('season_pos') or None)
+ thumbnail = xpath_text(item, './thumbnail_url')
+ duration = int_or_none(xpath_text(item, './duration'))
+ view_count = int_or_none(xpath_text(item, './views'))
+ comment_count = int_or_none(xpath_text(item, './count_comments'))
+ age_limit = int_or_none(xpath_text(item, './min_age'))
+
+ series = xpath_text(item, './project_name')
+ episode = xpath_text(item, './episode_name')