- device_types = ['ipad', 'android']
- if app_code != 'toutv':
+ metadata = self._download_xml(
+ 'http://api.radio-canada.ca/metaMedia/v1/index.ashx',
+ video_id, note='Downloading metadata XML', query={
+ 'appCode': app_code,
+ 'idMedia': video_id,
+ })
+
+ def get_meta(name):
+ el = find_xpath_attr(metadata, './/Meta', 'name', name)
+ return el.text if el is not None else None
+
+ if get_meta('protectionType'):
+ raise ExtractorError('This video is DRM protected.', expected=True)
+
+ device_types = ['ipad']
+ if not smuggled_data: