logo

youtube-dl

[mirror] Download/Watch videos from video hostersgit clone https://hacktivis.me/git/mirror/youtube-dl.git

vodpl.py (1032B)


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