mirror of
https://github.com/TeamNewPipe/NewPipeExtractor.git
synced 2025-04-27 23:40:36 +05:30
Implement getSubscriberCount() in YoutubeChannelInfoItemExtractor
This commit is contained in:
parent
6d20b2b1d0
commit
51fb26625a
@ -63,9 +63,13 @@ public class YoutubeChannelInfoItemExtractor implements ChannelInfoItemExtractor
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long getSubscriberCount() {
|
public long getSubscriberCount() throws ParsingException {
|
||||||
// TODO: get subscriber count, it's in subscriberCountText.simpleText as a string like "103M subscribers"
|
try {
|
||||||
return -1;
|
String subscribers = channelInfoItem.getObject("subscriberCountText").getString("simpleText").split(" ")[0];
|
||||||
|
return Utils.mixedNumberWordToLong(subscribers);
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new ParsingException("Could not get subscriber count", e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
x
Reference in New Issue
Block a user