1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-02-05 18:05:36 +08:00

[naver] add test for music video and fix escaped iframe urls

This commit is contained in:
remitamine 2015-10-17 10:51:07 +01:00
parent aaf7499008
commit 0a9fad8527

View File

@ -14,6 +14,7 @@ from ..utils import (
int_or_none,
float_or_none,
determine_ext,
unescapeHTML,
)
@ -71,6 +72,16 @@ class NaverIE(InfoExtractor):
'uploader_id': 'navermovie',
'uploader': '네이버 영화',
},
}, {
'url': 'http://music.naver.com/artist/videoPlayer.nhn?videoId=99476',
'md5': '4378409358f457bdce12e90f40ba33e2',
'info_dict': {
'id': 'E2651FBE1723D209C17AB611C296C57EA0A1',
'ext': 'mp4',
'title': '디아크 인사말',
'uploader_id': 'muploader_c',
'uploader': '',
},
}]
def _extract_video_formats(self, formats_list):
@ -140,6 +151,7 @@ class NaverIE(InfoExtractor):
if iframe_urls:
entries = []
for iframe_url in iframe_urls:
iframe_url = unescapeHTML(iframe_url)
if iframe_url.startswith('/'):
iframe_url = compat_urlparse.urljoin(url, iframe_url)
request = compat_urllib_request.Request(iframe_url, headers={'Referer': url})