+ data = self._parse_json(
+ self._html_search_regex(
+ r'\bclass=["\']seasons-tracks["\'][^>]+\bdata-custom-data=(["\'])(?P<value>{.+?})\1',
+ webpage, 'data', default='{}', group='value'),
+ display_id, fatal=False)
+
+ entries = []
+
+ if data:
+ episodes = data.get('episodes')
+ if isinstance(episodes, list):
+ for ep in episodes:
+ if not isinstance(ep, dict):
+ continue
+ ep_id = int_or_none(ep.get('id'))
+ ep_url = url_or_none(ep.get('url'))
+ if ep_id:
+ e = {
+ 'url': 'videomore:%s' % ep_id,
+ 'id': compat_str(ep_id),
+ }
+ elif ep_url:
+ e = {'url': ep_url}
+ else:
+ continue
+ e.update({
+ '_type': 'url',
+ 'ie_key': VideomoreIE.ie_key(),
+ 'title': str_or_none(ep.get('title')),
+ 'thumbnail': url_or_none(ep.get('image')),
+ 'duration': parse_duration(ep.get('duration')),
+ 'episode_number': int_or_none(ep.get('number')),
+ 'upload_date': unified_strdate(ep.get('date')),
+ })
+ entries.append(e)
+
+ if not entries:
+ entries = [
+ self.url_result(
+ 'videomore:%s' % video_id, ie=VideomoreIE.ie_key(),
+ video_id=video_id)
+ for video_id in orderedSet(re.findall(
+ r':(?:id|key)=["\'](\d+)["\']', webpage))]
+
+ if not entries:
+ entries = [
+ self.url_result(item) for item in re.findall(
+ r'<a[^>]+href="((?:https?:)?//videomore\.ru/%s/[^/]+)"[^>]+class="widget-item-desc"'
+ % display_id, webpage)]