kopia lustrzana https://github.com/TeamNewPipe/NewPipeExtractor
Improve documentation
> > I think you can use YoutubeParsingHelper.getTextFromObject() > That was used there before however I did not choose to use it again. > > ``runs`` returns an array with 3 items containing: > 0: ``<artistname>`` > 1: ``•`` > 2: ``<subscriberCount>`` > > There is 2 problems with that: > 1. It's inefficient for extracting the subscription count > 2. If for some reason the artist now has a name like "2k" the extraction malfunctions See also: https://github.com/TeamNewPipe/NewPipeExtractor/pull/1277#discussion_r1955148742pull/1277/head
rodzic
3ad9f17c53
commit
e4081243e7
|
@ -68,6 +68,8 @@ public class YoutubeMusicArtistInfoItemExtractor implements ChannelInfoItemExtra
|
|||
.getObject("musicResponsiveListItemFlexColumnRenderer")
|
||||
.getObject("text")
|
||||
.getArray("runs");
|
||||
// NOTE: YoutubeParsingHelper#getTextFromObject would use all entries from the run array,
|
||||
// which is not wanted as only the last entry contains the actual subscriberCount
|
||||
final String subscriberCount = runs.getObject(runs.size() - 1)
|
||||
.getString("text");
|
||||
if (!isNullOrEmpty(subscriberCount)) {
|
||||
|
|
Ładowanie…
Reference in New Issue