mirror of
				https://github.com/yt-dlp/yt-dlp.git
				synced 2025-11-04 08:35:12 +00:00 
			
		
		
		
	[CeskaTelevize] raise ExtractorError if you are outside of CR
This commit is contained in:
		@@ -8,7 +8,8 @@ from .common import InfoExtractor
 | 
				
			|||||||
from ..utils import (
 | 
					from ..utils import (
 | 
				
			||||||
    compat_urllib_request,
 | 
					    compat_urllib_request,
 | 
				
			||||||
    compat_urllib_parse,
 | 
					    compat_urllib_parse,
 | 
				
			||||||
    compat_urllib_parse_urlparse
 | 
					    compat_urllib_parse_urlparse,
 | 
				
			||||||
 | 
					    ExtractorError,
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -49,6 +50,10 @@ class CeskaTelevizeIE(InfoExtractor):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        webpage = self._download_webpage(url, video_id)
 | 
					        webpage = self._download_webpage(url, video_id)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if '<p class="title">Chyba konfigurace prohlížeče.</p>' not in webpage:
 | 
				
			||||||
 | 
					            msg = self._html_search_regex(r'<p class="title">(.+?)</p>', webpage, 'error-message')
 | 
				
			||||||
 | 
					            raise ExtractorError(msg.replace('<br />', ' '))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        typ = self._html_search_regex(r'getPlaylistUrl\(\[\{"type":"(.+?)","id":".+?"\}\],', webpage, 'type')
 | 
					        typ = self._html_search_regex(r'getPlaylistUrl\(\[\{"type":"(.+?)","id":".+?"\}\],', webpage, 'type')
 | 
				
			||||||
        episode_id = self._html_search_regex(r'getPlaylistUrl\(\[\{"type":".+?","id":"(.+?)"\}\],', webpage, 'episode_id')
 | 
					        episode_id = self._html_search_regex(r'getPlaylistUrl\(\[\{"type":".+?","id":"(.+?)"\}\],', webpage, 'episode_id')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user