So here's my question: I am very interested in computer science and programming, after issuing a search so I wanted to find out whether you can access web pages and there may eg reading labels.
Consider the following story:
It applies anywhere as Youtuber but must meet a minimum number. That is the program then check by going to the specified page of youtubers and there reads the chip. The class is yes: "yt-subscription-button-subscriber-count-branded horizontal yt-uix-tooltip" and you should then access the Title or tabindex ...
Is that even possible? If so, I ask for an explanation or an ex. How that works ... possibly even unnecessary programs or similar ...
The best answer
var eineliste = document.getElementsByClassName('meineklasse'); var zahldieichwill = eineliste.innerHTML;
So hast du eine Variable mit dem gewünschten Wert.
I once made with VBScript something like that, maybe you can implement the in java:
set ie = CreateObject ( "InternetExplorer.Application")
ie.visible = true
Do Until IE.readyState = 4
Do while IE.busy
classarr = ie.document.getElementsByClassName ( "yt-subscription-button-subscriber-count-branded horizontal")
classarr is an array of HTML tags with this class. So ambiguous. It would be better to have with getElementByID to the ID of the desired tags to access, this would however have the (unique) ID attribute.
Okay, here (
http: //stackoverflow.com/questions/238547/how-do-you-programmatically-download-a ...
) You can find information as you code the HTML of the website in a Java String get. The string you are looking then after cutting with the right ID and extracts the contents of the span. Note, however, that you have to change your program as soon as YouTube change the ID on its website.