[YouTube] Add check for channel items without description in search
This commit is contained in:
		
							parent
							
								
									9b7999fe54
								
							
						
					
					
						commit
						b7f8001a49
					
				
					 1 changed files with 8 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -95,7 +95,14 @@ public class YoutubeChannelInfoItemExtractor implements ChannelInfoItemExtractor
 | 
			
		|||
    @Override
 | 
			
		||||
    public String getDescription() throws ParsingException {
 | 
			
		||||
        try {
 | 
			
		||||
            return getTextFromObject(channelInfoItem.getObject("descriptionSnippet"));
 | 
			
		||||
            final JsonObject descriptionObject = channelInfoItem.getObject("descriptionSnippet");
 | 
			
		||||
 | 
			
		||||
            if (descriptionObject == null) {
 | 
			
		||||
                // Channel have no description.
 | 
			
		||||
                return null;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            return getTextFromObject(descriptionObject);
 | 
			
		||||
        } catch (Exception e) {
 | 
			
		||||
            throw new ParsingException("Could not get description", e);
 | 
			
		||||
        }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue