- http_code = redirect_info['http_code']
- if http_code == 403:
- message = 'We\'re sorry, but this video is not available in your region due to right restrictions.'
- elif http_code == 101:
- message = 'We\'re sorry, but this video is not yet available.'
- elif http_code == 404:
- message = 'We are experiencing technical difficulties that are preventing us from playing the video at this time. Please check back again soon.'
- elif http_code == 410:
- message = 'This video has expired and is no longer available for online streaming.'
- else:
- message = redirect_info['message']
- raise ExtractorError('PBS said: %s' % message, expected=True)
+ raise ExtractorError('PBS said: %s' % self._ERRORS.get(redirect_info['http_code'], redirect_info['message']), expected=True)