- video = self._download_json(
- 'http://beeg.com/api/v1/video/%s' % video_id, video_id)
+ webpage = self._download_webpage(url, video_id)
+
+ beeg_version = self._search_regex(
+ r'beeg_version\s*=\s*([\da-zA-Z_-]+)', webpage, 'beeg version',
+ default='1546225636701')
+
+ for api_path in ('', 'api.'):
+ video = self._download_json(
+ 'https://%sbeeg.com/api/v6/%s/video/%s'
+ % (api_path, beeg_version, video_id), video_id,
+ fatal=api_path == 'api.')
+ if video:
+ break