]>
Commit | Line | Data |
---|---|---|
7da2c871 JMF |
1 | from __future__ import unicode_literals |
2 | ||
3 | from .common import InfoExtractor | |
4 | ||
2156f16c | 5 | from ..compat import compat_urlparse |
7da2c871 JMF |
6 | |
7 | ||
8 | class TheSceneIE(InfoExtractor): | |
92519402 | 9 | _VALID_URL = r'https?://thescene\.com/watch/[^/]+/(?P<id>[^/#?]+)' |
7da2c871 JMF |
10 | |
11 | _TEST = { | |
12 | 'url': 'https://thescene.com/watch/vogue/narciso-rodriguez-spring-2013-ready-to-wear', | |
13 | 'info_dict': { | |
14 | 'id': '520e8faac2b4c00e3c6e5f43', | |
15 | 'ext': 'mp4', | |
16 | 'title': 'Narciso Rodriguez: Spring 2013 Ready-to-Wear', | |
17 | 'display_id': 'narciso-rodriguez-spring-2013-ready-to-wear', | |
441d7a32 S |
18 | 'duration': 127, |
19 | 'series': 'Style.com Fashion Shows', | |
20 | 'season': 'Ready To Wear Spring 2013', | |
21 | 'tags': list, | |
22 | 'categories': list, | |
7ad43623 RA |
23 | 'upload_date': '20120913', |
24 | 'timestamp': 1347512400, | |
25 | 'uploader': 'vogue', | |
7da2c871 JMF |
26 | }, |
27 | } | |
28 | ||
29 | def _real_extract(self, url): | |
30 | display_id = self._match_id(url) | |
2156f16c | 31 | |
7da2c871 | 32 | webpage = self._download_webpage(url, display_id) |
2156f16c S |
33 | |
34 | player_url = compat_urlparse.urljoin( | |
7da2c871 JMF |
35 | url, |
36 | self._html_search_regex( | |
37 | r'id=\'js-player-script\'[^>]+src=\'(.+?)\'', webpage, 'player url')) | |
38 | ||
7da2c871 | 39 | return { |
7ad43623 | 40 | '_type': 'url_transparent', |
2156f16c | 41 | 'display_id': display_id, |
7ad43623 RA |
42 | 'url': player_url, |
43 | 'ie_key': 'CondeNast', | |
7da2c871 | 44 | } |