[bbccouk] Capture and output error message (closes #13518)
authorSergey M․ <dstftw@gmail.com>
Thu, 29 Jun 2017 15:27:53 +0000 (22:27 +0700)
committerSergey M․ <dstftw@gmail.com>
Thu, 29 Jun 2017 15:27:53 +0000 (22:27 +0700)
youtube_dl/extractor/bbc.py

index 7cd4446b44ed4f487cca7df258005efd9f836500..6f5f9aa3a0e6a2621cf9ac7bac14ff0f7577a60b 100644 (file)
@@ -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