projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[nrk:skole] Fix extraction
[youtube-dl]
/
youtube_dl
/
extractor
/
mitele.py
diff --git
a/youtube_dl/extractor/mitele.py
b/youtube_dl/extractor/mitele.py
index c595f20775efd8e4aed348e4886ac55209e2c6e2..3589c223d7915226fadafddaa3749c21388781d6 100644
(file)
--- a/
youtube_dl/extractor/mitele.py
+++ b/
youtube_dl/extractor/mitele.py
@@
-2,11
+2,10
@@
from __future__ import unicode_literals
from .common import InfoExtractor
from ..compat import (
from .common import InfoExtractor
from ..compat import (
- compat_urllib_parse,
+ compat_urllib_parse
_urlencode
,
compat_urlparse,
)
from ..utils import (
compat_urlparse,
)
from ..utils import (
- encode_dict,
get_element_by_attribute,
int_or_none,
)
get_element_by_attribute,
int_or_none,
)
@@
-14,11
+13,11
@@
from ..utils import (
class MiTeleIE(InfoExtractor):
IE_DESC = 'mitele.es'
class MiTeleIE(InfoExtractor):
IE_DESC = 'mitele.es'
- _VALID_URL = r'http://www\.mitele\.es/[^/]+/[^/]+/[^/]+/(?P<id>[^/]+)/'
+ _VALID_URL = r'http
s?
://www\.mitele\.es/[^/]+/[^/]+/[^/]+/(?P<id>[^/]+)/'
- _TEST
S = [
{
+ _TEST
=
{
'url': 'http://www.mitele.es/programas-tv/diario-de/la-redaccion/programa-144/',
'url': 'http://www.mitele.es/programas-tv/diario-de/la-redaccion/programa-144/',
- 'md5': '0ff1a13aebb35d9bc14081ff633dd324',
+ # MD5 is unstable
'info_dict': {
'id': '0NF1jJnxS1Wu3pHrmvFyw2',
'display_id': 'programa-144',
'info_dict': {
'id': '0NF1jJnxS1Wu3pHrmvFyw2',
'display_id': 'programa-144',
@@
-28,7
+27,7
@@
class MiTeleIE(InfoExtractor):
'thumbnail': 're:(?i)^https?://.*\.jpg$',
'duration': 2913,
},
'thumbnail': 're:(?i)^https?://.*\.jpg$',
'duration': 2913,
},
- }
]
+ }
def _real_extract(self, url):
display_id = self._match_id(url)
def _real_extract(self, url):
display_id = self._match_id(url)
@@
-60,7
+59,7
@@
class MiTeleIE(InfoExtractor):
'sta': '0',
}
media = self._download_json(
'sta': '0',
}
media = self._download_json(
- '%s/?%s' % (gat, compat_urllib_parse
.urlencode(encode_dict(token_data)
)),
+ '%s/?%s' % (gat, compat_urllib_parse
_urlencode(token_data
)),
display_id, 'Downloading %s JSON' % location['loc'])
file_ = media.get('file')
if not file_:
display_id, 'Downloading %s JSON' % location['loc'])
file_ = media.get('file')
if not file_:
@@
-68,6
+67,7
@@
class MiTeleIE(InfoExtractor):
formats.extend(self._extract_f4m_formats(
file_ + '&hdcore=3.2.0&plugin=aasp-3.2.0.77.18',
display_id, f4m_id=loc))
formats.extend(self._extract_f4m_formats(
file_ + '&hdcore=3.2.0&plugin=aasp-3.2.0.77.18',
display_id, f4m_id=loc))
+ self._sort_formats(formats)
title = self._search_regex(
r'class="Destacado-text"[^>]*>\s*<strong>([^<]+)</strong>', webpage, 'title')
title = self._search_regex(
r'class="Destacado-text"[^>]*>\s*<strong>([^<]+)</strong>', webpage, 'title')