1 from __future__ import unicode_literals
4 from .common import InfoExtractor
11 class GoldenMoustacheIE(InfoExtractor):
12 _VALID_URL = r'https?://(?:www\.)?goldenmoustache\.com/(?P<display_id>[\w-]+)-(?P<id>\d+)'
14 'url': 'http://www.goldenmoustache.com/suricate-le-poker-3700/',
15 'md5': '0f904432fa07da5054d6c8beb5efb51a',
19 'title': 'Suricate - Le Poker',
20 'description': 'md5:3d1f242f44f8c8cb0a106f1fd08e5dc9',
21 'thumbnail': 're:^https?://.*\.jpg$',
26 def _real_extract(self, url):
27 video_id = self._match_id(url)
28 webpage = self._download_webpage(url, video_id)
30 video_url = self._html_search_regex(
31 r'data-src-type="mp4" data-src="([^"]+)"', webpage, 'video URL')
32 title = self._html_search_regex(
33 r'<title>(.*?) - Golden Moustache</title>', webpage, 'title')
34 thumbnail = self._og_search_thumbnail(webpage)
35 description = self._og_search_description(webpage)
36 view_count = int_or_none(self._html_search_regex(
37 r'<strong>([0-9]+)</strong>\s*VUES</span>',
38 webpage, 'view count', fatal=False))
45 'description': description,
46 'thumbnail': thumbnail,
47 'view_count': view_count,