1 from __future__ import unicode_literals
3 from .common import InfoExtractor
4 from ..utils import smuggle_url
7 class AEIE(InfoExtractor):
8 _VALID_URL = r'https?://(?:www\.)?(?:(?:history|aetv|mylifetime)\.com|fyi\.tv)/(?:[^/]+/)+(?P<id>[^/]+?)(?:$|[?#])'
11 'url': 'http://www.history.com/topics/valentines-day/history-of-valentines-day/videos/bet-you-didnt-know-valentines-day?m=528e394da93ae&s=undefined&f=1&free=false',
15 'title': "Bet You Didn't Know: Valentine's Day",
16 'description': 'md5:7b57ea4829b391995b405fa60bd7b5f7',
20 'skip_download': True,
22 'add_ie': ['ThePlatform'],
24 'url': 'http://www.history.com/shows/mountain-men/season-1/episode-1',
28 'title': "Winter Is Coming",
29 'description': 'md5:a40e370925074260b1c8a633c632c63a',
33 'skip_download': True,
35 'add_ie': ['ThePlatform'],
37 'url': 'http://www.aetv.com/shows/duck-dynasty/video/inlawful-entry',
40 'url': 'http://www.fyi.tv/shows/tiny-house-nation/videos/207-sq-ft-minnesota-prairie-cottage',
43 'url': 'http://www.mylifetime.com/shows/project-runway-junior/video/season-1/episode-6/superstar-clients',
47 def _real_extract(self, url):
48 video_id = self._match_id(url)
50 webpage = self._download_webpage(url, video_id)
53 r'data-href="[^"]*/%s"[^>]+data-release-url="([^"]+)"' % video_id,
54 r"media_url\s*=\s*'([^']+)'"
56 video_url = self._search_regex(video_url_re, webpage, 'video url')
58 info = self._search_json_ld(webpage, video_id, fatal=False)
60 '_type': 'url_transparent',
61 'url': smuggle_url(video_url, {'sig': {'key': 'crazyjava', 'secret': 's3cr3t'}}),