1 from __future__ import unicode_literals
3 from .common import InfoExtractor
10 class NationalGeographicIE(InfoExtractor):
12 _VALID_URL = r'https?://video\.nationalgeographic\.com/.*?'
16 'url': 'http://video.nationalgeographic.com/video/news/150210-news-crab-mating-vin?source=featuredvideo',
17 'md5': '730855d559abbad6b42c2be1fa584917',
19 'id': '0000014b-70a1-dd8c-af7f-f7b559330001',
21 'title': 'Mating Crabs Busted by Sharks',
22 'description': 'md5:16f25aeffdeba55aaa8ec37e093ad8b3',
24 'add_ie': ['ThePlatform'],
27 'url': 'http://video.nationalgeographic.com/wild/when-sharks-attack/the-real-jaws',
28 'md5': '6a3105eb448c070503b3105fb9b320b5',
30 'id': 'ngc-I0IauNSWznb_UV008GxSbwY35BZvgi2e',
32 'title': 'The Real Jaws',
33 'description': 'md5:8d3e09d9d53a85cd397b4b21b2c77be6',
35 'add_ie': ['ThePlatform'],
39 def _real_extract(self, url):
40 name = url_basename(url)
42 webpage = self._download_webpage(url, name)
43 guid = self._search_regex(
44 r'id="(?:videoPlayer|player-container)"[^>]+data-guid="([^"]+)"',
48 '_type': 'url_transparent',
49 'ie_key': 'ThePlatform',
51 'http://link.theplatform.com/s/ngs/media/guid/2423130747/%s?mbr=true' % guid,
52 {'force_smil_url': True}),