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.

32 lines
940 B

  1. from __future__ import unicode_literals
  2. import re
  3. from .common import InfoExtractor
  4. class Canal13clIE(InfoExtractor):
  5. _VALID_URL = r'^http://(?:www\.)?13\.cl/'
  6. IE_NAME = 'Canal13cl'
  7. def _real_extract(self, url):
  8. webpage = self._download_webpage(url, url)
  9. video_id = self._html_search_regex(
  10. r'http://streaming.13.cl/(.*)\.mp4',
  11. webpage, u'video_id')
  12. title = self._html_search_regex(
  13. r'(articuloTitulo = \"(.*?)\"|(.*?)\|)',
  14. webpage, u'title')
  15. url = self._html_search_regex(
  16. r'articuloVideo = \"(.*?)\"',
  17. webpage, u'url')
  18. thumbnail = self._html_search_regex (
  19. r'articuloImagen = \"(.*?)\"',
  20. webpage, u'thumbnail')
  21. return {
  22. 'video_id': video_id,
  23. 'url': url,
  24. 'title': title,
  25. 'ext': 'mp4',
  26. 'thumbnail': thumbnail
  27. }