2 from __future__ import unicode_literals
6 from .common import InfoExtractor
9 class SeekerIE(InfoExtractor):
10 _VALID_URL = r'https?://(?:www\.)?seeker\.com/(?P<display_id>.*)-(?P<article_id>\d+)\.html'
12 # player.loadRevision3Item
13 'url': 'http://www.seeker.com/should-trump-be-required-to-release-his-tax-returns-1833805621.html',
14 'md5': '30c1dc4030cc715cf05b423d0947ac18',
18 'title': 'Should Trump Be Required To Release His Tax Returns?',
19 'description': 'Donald Trump has been secretive about his "big," "beautiful" tax returns. So what can we learn if he decides to release them?',
20 'uploader': 'Seeker Daily',
21 'uploader_id': 'seekerdaily',
24 'url': 'http://www.seeker.com/changes-expected-at-zoos-following-recent-gorilla-lion-shootings-1834116536.html',
27 'md5': '83bcd157cab89ad7318dd7b8c9cf1306',
31 'title': 'The Pros & Cons Of Zoos',
32 'description': 'Zoos are often depicted as a terrible place for animals to live, but is there any truth to this?',
34 'uploader_id': 'dnews',
40 'title': 'After Gorilla Killing, Changes Ahead for Zoos',
41 'description': 'The largest association of zoos and others are hoping to learn from recent incidents that led to the shooting deaths of a gorilla and two lions.',
45 def _real_extract(self, url):
46 display_id, article_id = re.match(self._VALID_URL, url).groups()
47 webpage = self._download_webpage(url, display_id)
48 mobj = re.search(r"player\.loadRevision3Item\('([^']+)'\s*,\s*(\d+)\);", webpage)
50 playlist_type, playlist_id = mobj.groups()
51 return self.url_result(
52 'revision3:%s:%s' % (playlist_type, playlist_id), 'Revision3Embed', playlist_id)
54 entries = [self.url_result('revision3:video_id:%s' % video_id, 'Revision3Embed', video_id) for video_id in re.findall(
55 r'<iframe[^>]+src=[\'"](?:https?:)?//api\.seekernetwork\.com/player/embed\?videoId=(\d+)', webpage)]
56 return self.playlist_result(
57 entries, article_id, self._og_search_title(webpage), self._og_search_description(webpage))