aboutsummaryrefslogtreecommitdiffhomepage
path: root/youtube_dl/extractor/vodpl.py
diff options
context:
space:
mode:
authorFilippo Valsorda <[email protected]>2018-01-07 15:03:28 +0100
committerGitHub <[email protected]>2018-01-07 15:03:28 +0100
commit97bc05116e15df3cf1b7b7216c60fad7ee0acc9f (patch)
tree453059413184d22a44241d251a82196c5d2461eb /youtube_dl/extractor/vodpl.py
parent7608a91ee7b40c74a35c30b44731606382702592 (diff)
parent0a5b1295b7c1aa6395b65ee137087c540b37b32b (diff)
downloadyoutube-dl-97bc05116e15df3cf1b7b7216c60fad7ee0acc9f.tar.gz
youtube-dl-97bc05116e15df3cf1b7b7216c60fad7ee0acc9f.zip
Merge branch 'master' into totalwebcastingtotalwebcasting
Diffstat (limited to 'youtube_dl/extractor/vodpl.py')
-rw-r--r--youtube_dl/extractor/vodpl.py32
1 files changed, 32 insertions, 0 deletions
diff --git a/youtube_dl/extractor/vodpl.py b/youtube_dl/extractor/vodpl.py
new file mode 100644
index 000000000..9e919708e
--- /dev/null
+++ b/youtube_dl/extractor/vodpl.py
@@ -0,0 +1,32 @@
+# coding: utf-8
+from __future__ import unicode_literals
+
+from .onet import OnetBaseIE
+
+
+class VODPlIE(OnetBaseIE):
+ _VALID_URL = r'https?://vod\.pl/(?:[^/]+/)+(?P<id>[0-9a-zA-Z]+)'
+
+ _TESTS = [{
+ 'url': 'https://vod.pl/filmy/chlopaki-nie-placza/3ep3jns',
+ 'md5': 'a7dc3b2f7faa2421aefb0ecaabf7ec74',
+ 'info_dict': {
+ 'id': '3ep3jns',
+ 'ext': 'mp4',
+ 'title': 'Chłopaki nie płaczą',
+ 'description': 'md5:f5f03b84712e55f5ac9f0a3f94445224',
+ 'timestamp': 1463415154,
+ 'duration': 5765,
+ 'upload_date': '20160516',
+ },
+ }, {
+ 'url': 'https://vod.pl/seriale/belfer-na-planie-praca-kamery-online/2c10heh',
+ 'only_matching': True,
+ }]
+
+ def _real_extract(self, url):
+ video_id = self._match_id(url)
+ webpage = self._download_webpage(url, video_id)
+ info_dict = self._extract_from_id(self._search_mvp_id(webpage), webpage)
+ info_dict['id'] = video_id
+ return info_dict