]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
[laola1tv] Improve error detection and skip an invalid test
authorYen Chi Hsuan <yan12125@gmail.com>
Thu, 14 Apr 2016 06:11:28 +0000 (14:11 +0800)
committerYen Chi Hsuan <yan12125@gmail.com>
Thu, 14 Apr 2016 06:11:28 +0000 (14:11 +0800)
youtube_dl/extractor/laola1tv.py

index d4fbafece22cc18a3938ff32cb29dfeb162ac122..2fab38079aac0c5f20a1772d52fa52642cb520bf 100644 (file)
@@ -63,6 +63,7 @@ class Laola1TvIE(InfoExtractor):
         'params': {
             'skip_download': True,
         },
+        'skip': 'This live stream has already finished.',
     }]
 
     def _real_extract(self, url):
@@ -74,6 +75,9 @@ class Laola1TvIE(InfoExtractor):
 
         webpage = self._download_webpage(url, display_id)
 
+        if 'Dieser Livestream ist bereits beendet.' in webpage:
+            raise ExtractorError('This live stream has already finished.', expected=True)
+
         iframe_url = self._search_regex(
             r'<iframe[^>]*?id="videoplayer"[^>]*?src="([^"]+)"',
             webpage, 'iframe url')