We are about to switch to a new forum software. Until then we have removed the registration on this forum.
hi. how to read info from the web? and I need to look for words specific.
String[] allwords;
// Any punctuation is used as a delimiter.
String delimiters = "";
String word ="mercado";
void setup() {
size(360, 640);
// Load A Midsummer Night's Dream into an array of strings
String url = "https://articulo.mercadolibre.com.ar/MLA-696187159-split-samsung-3000-fg-frio-calor-modelo-inverter-ar12ksw-_JM";
String[] rawtext = loadStrings(url);
for (int i = 0; i<rawtext.length; i++) {
String ss = rawtext[i];
if(word==ss){
println("OK");
}
}
the problem, it's like the data is encoded, and it does not show all the information on the wed. like there are windows to see the information of a page. I do not understand.
Answers
`
Here it works but I do not see some words. for example sold "vendidos", nor its value
Parsing HTML for content can be extremely hard, and it is often better to use an existing HTML parsing library rather than write your own.
Are you trying to work only with only specific pages, or deal with potentially any URL?
Are the URLs going to be yours -- do you control the content?
Rather than equals, you probably want to find strings in other strings -- otherwise the way that the delimiters split the tokens will often prevent you from making matches.