소스 검색

[bbccouk] Capture and output error message (closes #13518)

Sergey M․ 8 년 전
부모
커밋
b2ed954fc6
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  1. 6 0
      youtube_dl/extractor/bbc.py

+ 6 - 0
youtube_dl/extractor/bbc.py

@@ -523,6 +523,12 @@ class BBCCoUkIE(InfoExtractor):
 
         webpage = self._download_webpage(url, group_id, 'Downloading video page')
 
+        error = self._search_regex(
+            r'<div\b[^>]+\bclass=["\']smp__message delta["\'][^>]*>([^<]+)<',
+            webpage, 'error', default=None)
+        if error:
+            raise ExtractorError(error, expected=True)
+
         programme_id = None
         duration = None