[naver] Enhanced error detection

pull/8/head
Yen Chi Hsuan 10 years ago
parent 6d00a2dcd1
commit c23848b3c5

@ -35,7 +35,7 @@ class NaverIE(InfoExtractor):
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>',
r'(?s)<div class="(?:nation_error|nation_box)">\s*(?:<!--.*?-->)?\s*<p class="[^"]+">(?P<msg>.+?)</p>\s*</div>',
webpage)
if m_error:
raise ExtractorError(clean_html(m_error.group('msg')), expected=True)

Loading…
Cancel
Save