mirror of
				https://github.com/ytdl-org/youtube-dl
				synced 2025-11-04 03:33:46 +00:00 
			
		
		
		
	[eagleplatform] return the code to handle errors in all _download_json requests
This commit is contained in:
		
							parent
							
								
									9d632b1b27
								
							
						
					
					
						commit
						22becac4bd
					
				@ -53,10 +53,13 @@ class EaglePlatformIE(InfoExtractor):
 | 
				
			|||||||
        if status != 200:
 | 
					        if status != 200:
 | 
				
			||||||
            raise ExtractorError(' '.join(response['errors']), expected=True)
 | 
					            raise ExtractorError(' '.join(response['errors']), expected=True)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def _get_video_url(self, url_or_request, video_id, note='Downloading JSON metadata'):
 | 
					    def _download_json(self, url_or_request, video_id, note='Downloading JSON metadata'):
 | 
				
			||||||
        response = self._download_json(url_or_request, video_id, note)
 | 
					        response = super(EaglePlatformIE, self)._download_json(url_or_request, video_id, note)
 | 
				
			||||||
        self._handle_error(response)
 | 
					        self._handle_error(response)
 | 
				
			||||||
        return response['data'][0]
 | 
					        return response
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def _get_video_url(self, url_or_request, video_id, note='Downloading JSON metadata'):
 | 
				
			||||||
 | 
					        return self._download_json(url_or_request, video_id, note)['data'][0]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def _real_extract(self, url):
 | 
					    def _real_extract(self, url):
 | 
				
			||||||
        mobj = re.match(self._VALID_URL, url)
 | 
					        mobj = re.match(self._VALID_URL, url)
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user