canal13cl.py 773 B

12345678910111213141516171819202122232425262728
  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/programa/'
  6. IE_NAME = 'Canal13cl'
  7. def _real_extract(self, url):
  8. webpage = self._download_webpage(url)
  9. title = self._html_search_regex(
  10. r'articuloTitulo = \'(.*?)\'',
  11. webpage, u'title')
  12. url = self._html_search_regex(
  13. r'articuloVideo = \'(.*?)\'',
  14. webpage, u'url')
  15. thumbnail = self._html_search_regex (
  16. r'articuloImagen = \'(.*?)\'',
  17. webpage, u'thumbnail')
  18. return {
  19. 'url': url,
  20. 'title': title,
  21. 'ext': 'mp4',
  22. 'thumbnail': thumbnail
  23. }