mirror of
https://github.com/TeamNewPipe/NewPipeExtractor
synced 2025-09-02 15:25:32 +00:00
[YouTube] Add check for channel items without description in search
This commit is contained in:
@@ -95,7 +95,14 @@ public class YoutubeChannelInfoItemExtractor implements ChannelInfoItemExtractor
|
|||||||
@Override
|
@Override
|
||||||
public String getDescription() throws ParsingException {
|
public String getDescription() throws ParsingException {
|
||||||
try {
|
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) {
|
} catch (Exception e) {
|
||||||
throw new ParsingException("Could not get description", e);
|
throw new ParsingException("Could not get description", e);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user