diff options
author | Philipp Hagemeister <phihag@phihag.de> | 2014-10-29 20:10:07 +0100 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2014-10-29 20:10:07 +0100 |
commit | 7d11297f3f91e6ddd3f0caa5ad4dca1a40d6c820 (patch) | |
tree | 794503925069a94a5af82daf3b3d9fa786e9f58a /youtube_dl/extractor/naver.py | |
parent | 6ad4013d40e839211e2896129eed05ccd40ee963 (diff) | |
parent | dbd1283d31aa1df43bf9b3255dc27a1c8bfed4ca (diff) |
Merge branch 'master' of github.com:rg3/youtube-dl
Diffstat (limited to 'youtube_dl/extractor/naver.py')
-rw-r--r-- | youtube_dl/extractor/naver.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/youtube_dl/extractor/naver.py b/youtube_dl/extractor/naver.py index c0231c197..cb1af9ecc 100644 --- a/youtube_dl/extractor/naver.py +++ b/youtube_dl/extractor/naver.py @@ -7,6 +7,7 @@ from .common import InfoExtractor from ..utils import ( compat_urllib_parse, ExtractorError, + clean_html, ) @@ -31,6 +32,11 @@ class NaverIE(InfoExtractor): m_id = re.search(r'var rmcPlayer = new nhn.rmcnmv.RMCVideoPlayer\("(.+?)", "(.+?)"', webpage) if m_id is None: + m_error = re.search( + r'(?s)<div class="nation_error">\s*(?:<!--.*?-->)?\s*<p class="[^"]+">(?P<msg>.+?)</p>\s*</div>', + webpage) + if m_error: + raise ExtractorError(clean_html(m_error.group('msg')), expected=True) raise ExtractorError('couldn\'t extract vid and key') vid = m_id.group(1) key = m_id.group(2) |