]> Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/cliprs.py
Update upstream source from tag 'upstream/2019.06.08'
[youtubedl] / youtube_dl / extractor / cliprs.py
1 # coding: utf-8
2 from __future__ import unicode_literals
3
4 from .onet import OnetBaseIE
5
6
7 class ClipRsIE(OnetBaseIE):
8 _VALID_URL = r'https?://(?:www\.)?clip\.rs/(?P<id>[^/]+)/\d+'
9 _TEST = {
10 'url': 'http://www.clip.rs/premijera-frajle-predstavljaju-novi-spot-za-pesmu-moli-me-moli/3732',
11 'md5': 'c412d57815ba07b56f9edc7b5d6a14e5',
12 'info_dict': {
13 'id': '1488842.1399140381',
14 'ext': 'mp4',
15 'title': 'PREMIJERA Frajle predstavljaju novi spot za pesmu Moli me, moli',
16 'description': 'md5:56ce2c3b4ab31c5a2e0b17cb9a453026',
17 'duration': 229,
18 'timestamp': 1459850243,
19 'upload_date': '20160405',
20 }
21 }
22
23 def _real_extract(self, url):
24 display_id = self._match_id(url)
25
26 webpage = self._download_webpage(url, display_id)
27
28 mvp_id = self._search_mvp_id(webpage)
29
30 info_dict = self._extract_from_id(mvp_id, webpage)
31 info_dict['display_id'] = display_id
32
33 return info_dict