- 'Downloading timestamp JSON', data=json.dumps({
- 'method': 'da.timestamp.get',
- 'params': []
- }).encode())['result']
-
- data = data % 353
- query = {
- 'ts': timestamp,
- 'sign': CMAC.new(self._LIGHT_KEY, timestamp.encode() + data, Blowfish).hexdigest(),
- }
- except ImportError:
- data = data % 183
- query = {}
-
- video_json = self._download_json(
- self._LIGHT_URL, video_id,
- 'Downloading video JSON', data=data, query=query)
-
- error = video_json.get('error')
- if error:
- origin = error.get('origin')
- message = error.get('message') or error.get('user_message')
- extractor_msg = 'Unable to download video %s'
- if origin == 'NotAllowedForLocation':
- self.raise_geo_restricted(message, self._GEO_COUNTRIES)
- elif origin == 'NoRedisValidData':
- extractor_msg = 'Video %s does not exist'
- elif message:
- if 'недоступен для просмотра на площадке s183' in message:
+ 'Downloading video JSON', data=content_data, query=query)
+
+ error = video_json.get('error')
+ if error:
+ origin = error.get('origin')
+ message = error.get('message') or error.get('user_message')
+ extractor_msg = 'Unable to download video %s'
+ if origin == 'NotAllowedForLocation':
+ self.raise_geo_restricted(message, self._GEO_COUNTRIES)
+ elif origin == 'NoRedisValidData':
+ extractor_msg = 'Video %s does not exist'
+ elif site == 353:
+ continue
+ elif bundled: