]> Raphaël G. Git Repositories - youtubedl/blob - youtube_dl/extractor/vodpl.py
Update README.md
[youtubedl] / youtube_dl / extractor / vodpl.py
1 # coding: utf-8
2 from __future__ import unicode_literals
3
4 from .onet import OnetBaseIE
5
6
7 class VODPlIE(OnetBaseIE):
8 _VALID_URL = r'https?://vod\.pl/(?:[^/]+/)+(?P<id>[0-9a-zA-Z]+)'
9
10 _TESTS = [{
11 'url': 'https://vod.pl/filmy/chlopaki-nie-placza/3ep3jns',
12 'md5': 'a7dc3b2f7faa2421aefb0ecaabf7ec74',
13 'info_dict': {
14 'id': '3ep3jns',
15 'ext': 'mp4',
16 'title': 'Chłopaki nie płaczą',
17 'description': 'md5:f5f03b84712e55f5ac9f0a3f94445224',
18 'timestamp': 1463415154,
19 'duration': 5765,
20 'upload_date': '20160516',
21 },
22 }, {
23 'url': 'https://vod.pl/seriale/belfer-na-planie-praca-kamery-online/2c10heh',
24 'only_matching': True,
25 }]
26
27 def _real_extract(self, url):
28 video_id = self._match_id(url)
29 webpage = self._download_webpage(url, video_id)
30 info_dict = self._extract_from_id(self._search_mvp_id(webpage), webpage)
31 info_dict['id'] = video_id
32 return info_dict