[laola1tv] Improve error detection and skip an invalid test
This commit is contained in:
		
							parent
							
								
									f141fefab7
								
							
						
					
					
						commit
						d1c4e4ba15
					
				
					 1 changed files with 4 additions and 0 deletions
				
			
		| 
						 | 
					@ -63,6 +63,7 @@ class Laola1TvIE(InfoExtractor):
 | 
				
			||||||
        'params': {
 | 
					        'params': {
 | 
				
			||||||
            'skip_download': True,
 | 
					            'skip_download': True,
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
 | 
					        'skip': 'This live stream has already finished.',
 | 
				
			||||||
    }]
 | 
					    }]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def _real_extract(self, url):
 | 
					    def _real_extract(self, url):
 | 
				
			||||||
| 
						 | 
					@ -74,6 +75,9 @@ class Laola1TvIE(InfoExtractor):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        webpage = self._download_webpage(url, display_id)
 | 
					        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(
 | 
					        iframe_url = self._search_regex(
 | 
				
			||||||
            r'<iframe[^>]*?id="videoplayer"[^>]*?src="([^"]+)"',
 | 
					            r'<iframe[^>]*?id="videoplayer"[^>]*?src="([^"]+)"',
 | 
				
			||||||
            webpage, 'iframe url')
 | 
					            webpage, 'iframe url')
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue