1 from __future__ import unicode_literals
3 from .common import InfoExtractor
6 class IconosquareIE(InfoExtractor):
7 _VALID_URL = r'https?://(www\.)?(?:iconosquare\.com|statigr\.am)/p/(?P<id>[^/]+)'
9 'url': 'http://statigr.am/p/522207370455279102_24101272',
10 'md5': '6eb93b882a3ded7c378ee1d6884b1814',
12 'id': '522207370455279102_24101272',
14 'uploader_id': 'aguynamedpatrick',
15 'title': 'Instagram photo by @aguynamedpatrick (Patrick Janelle)',
16 'description': 'md5:644406a9ec27457ed7aa7a9ebcd4ce3d',
20 def _real_extract(self, url):
21 video_id = self._match_id(url)
22 webpage = self._download_webpage(url, video_id)
23 title = self._html_search_regex(
24 r'<title>(.+?)(?: *\(Videos?\))? \| (?:Iconosquare|Statigram)</title>',
26 uploader_id = self._html_search_regex(
27 r'@([^ ]+)', title, 'uploader name', fatal=False)
31 'url': self._og_search_video_url(webpage),
33 'description': self._og_search_description(webpage),
34 'thumbnail': self._og_search_thumbnail(webpage),
35 'uploader_id': uploader_id