+ # Table of Contents seems to always be at this address, so fetch it directly.
+ # The website fetches configurationJS.php5, which links to tableOfContentsJS.php5.
+ table_of_contents = self._download_json(
+ 'https://www.wdrmaus.de/elefantenseite/data/tableOfContentsJS.php5',
+ display_id)
+ if display_id not in table_of_contents:
+ raise ExtractorError(
+ 'No entry in site\'s table of contents for this URL. '
+ 'Is the fragment part of the URL (after the #) correct?',
+ expected=True)
+ xml_metadata_path = table_of_contents[display_id]['xmlPath']
+ xml_metadata = self._download_xml(
+ 'https://www.wdrmaus.de/elefantenseite/' + xml_metadata_path,
+ display_id)
+ zmdb_url_element = xml_metadata.find('./movie/zmdb_url')
+ if zmdb_url_element is None:
+ raise ExtractorError(
+ '%s is not a video' % display_id, expected=True)
+ return self.url_result(zmdb_url_element.text, ie=WDRIE.ie_key())