mirror of
				https://gitlab.com/ytdl-org/youtube-dl.git
				synced 2025-11-04 03:17:07 -05:00 
			
		
		
		
	[platzi] Improve client data extraction (closes #22290)
This commit is contained in:
		@@ -107,7 +107,11 @@ class PlatziIE(PlatziBaseIE):
 | 
			
		||||
 | 
			
		||||
        data = self._parse_json(
 | 
			
		||||
            self._search_regex(
 | 
			
		||||
                r'client_data\s*=\s*({.+?})\s*;', webpage, 'client data'),
 | 
			
		||||
                # client_data may contain "};" so that we have to try more
 | 
			
		||||
                # strict regex first
 | 
			
		||||
                (r'client_data\s*=\s*({.+?})\s*;\s*\n',
 | 
			
		||||
                 r'client_data\s*=\s*({.+?})\s*;'),
 | 
			
		||||
                webpage, 'client data'),
 | 
			
		||||
            lecture_id)
 | 
			
		||||
 | 
			
		||||
        material = data['initialState']['material']
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user