]>
Commit | Line | Data |
---|---|---|
8d9453b9 JMF |
1 | from __future__ import unicode_literals |
2 | ||
3 | from .mtv import MTVServicesInfoExtractor | |
4 | ||
5 | ||
6 | class SpikeIE(MTVServicesInfoExtractor): | |
935c7360 | 7 | _VALID_URL = r'''(?x)https?:// |
4d1cdb5b | 8 | (?:www\.spike\.com/(?:video-(?:clips|playlists)|(?:full-)?episodes)/.+| |
20b4492c | 9 | m\.spike\.com/videos/video\.rbml\?id=(?P<id>[^&]+)) |
935c7360 | 10 | ''' |
8d9453b9 JMF |
11 | _TEST = { |
12 | 'url': 'http://www.spike.com/video-clips/lhtu8m/auction-hunters-can-allen-ride-a-hundred-year-old-motorcycle', | |
13 | 'md5': '1a9265f32b0c375793d6c4ce45255256', | |
14 | 'info_dict': { | |
15 | 'id': 'b9c8221a-4e50-479a-b86d-3333323e38ba', | |
16 | 'ext': 'mp4', | |
af1588c0 | 17 | 'title': 'Auction Hunters|Can Allen Ride A Hundred Year-Old Motorcycle?', |
8d9453b9 JMF |
18 | 'description': 'md5:fbed7e82ed5fad493615b3094a9499cb', |
19 | }, | |
20 | } | |
21 | ||
22 | _FEED_URL = 'http://www.spike.com/feeds/mrss/' | |
340b0468 | 23 | _MOBILE_TEMPLATE = 'http://m.spike.com/videos/video.rbml?id=%s' |
935c7360 JMF |
24 | |
25 | def _real_extract(self, url): | |
dee3f737 S |
26 | mobile_id = self._match_id(url) |
27 | if mobile_id: | |
935c7360 JMF |
28 | url = 'http://www.spike.com/video-clips/%s' % mobile_id |
29 | return super(SpikeIE, self)._real_extract(url) |