'Jsoup | Parsing youtube stream
I need to receive information from a certain stream on YouTube every half minute (likes / dislikes, viewers). I don't want to use yt api because it would be too costly in terms of quota, so I decided to use a html parsing java library - JSoup.
I have no way to get information about the number of viewers on the stream and the number of likes / dislikes (because I don't really understand html tags and css selectors). Please help me get this information from the stream on YouTube
This code seems to contain the necessary information about the stream, but for some reason, the title of the stream is completely different there, as if it were a completely different stream, so the number of likes and viewers is quite likely unreliable
Elements elements1 = liveDocument.body().select("script[nonce]");
System.out.println(elements1.get(1).getAllElements());
Tried code like this but it returns empty string to me
liveDocument.body().getElementsByTag("span.view-count.style-scope.ytd-video-view-count-renderer")
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
