X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=youtube_dl%2Fextractor%2Fnaver.py;h=c10405f04d3cc1b3e89004029b7502112e9baa29;hb=1cc79574fc5df21bf35dccf61eac0e9e75ed8d20;hp=5ce35dbf5aeca02b19b05f7da7b5cc27a2ffe18a;hpb=5f6a1245ffa9276c1af59b0835afeef67e2fb5b1;p=youtube-dl diff --git a/youtube_dl/extractor/naver.py b/youtube_dl/extractor/naver.py index 5ce35dbf5..c10405f04 100644 --- a/youtube_dl/extractor/naver.py +++ b/youtube_dl/extractor/naver.py @@ -4,8 +4,10 @@ from __future__ import unicode_literals import re from .common import InfoExtractor -from ..utils import ( +from ..compat import ( compat_urllib_parse, +) +from ..utils import ( ExtractorError, clean_html, ) @@ -26,11 +28,11 @@ class NaverIE(InfoExtractor): } def _real_extract(self, url): - mobj = re.match(self._VALID_URL, url) - video_id = mobj.group(1) + video_id = self._match_id(url) webpage = self._download_webpage(url, video_id) + m_id = re.search(r'var rmcPlayer = new nhn.rmcnmv.RMCVideoPlayer\("(.+?)", "(.+?)"', - webpage) + webpage) if m_id is None: m_error = re.search( r'(?s)
\s*(?:)?\s*

(?P.+?)

\s*
',