mirror of
https://github.com/TeamNewPipe/NewPipeExtractor
synced 2025-09-02 15:25:32 +00:00
Fix getSubscriberCount() for 0 subscribers
This commit is contained in:
@@ -177,8 +177,12 @@ public class YoutubeChannelExtractor extends ChannelExtractor {
|
|||||||
throw new ParsingException("Could not get subscriber count", e);
|
throw new ParsingException("Could not get subscriber count", e);
|
||||||
}
|
}
|
||||||
} else {
|
} 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;
|
return -1;
|
||||||
|
} else {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user