You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
1.0 KiB

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