2
0
mirror of https://github.com/TeamNewPipe/NewPipeExtractor synced 2025-09-02 07:15:37 +00:00

Fix getSubscriberCount() for 0 subscribers

This commit is contained in:
wb9688
2020-02-27 16:26:22 +01:00
parent 8ebd971648
commit 0798bdd5cd

View File

@@ -177,8 +177,12 @@ public class YoutubeChannelExtractor extends ChannelExtractor {
throw new ParsingException("Could not get subscriber count", e);
}
} else {
// If the element is null, the channel have the subscriber count disabled
// If there's no subscribe button, the channel has the subscriber count disabled
if (initialData.getObject("header").getObject("c4TabbedHeaderRenderer").getObject("subscribeButton") == null) {
return -1;
} else {
return 0;
}
}
}