Hello thunkers, I have a problem in my hands to solve a function in my new application, and I am in need of help. i am using webApi to receive the html code from a web site. the html code and then shown in a label. now the next one i needed to create a list of some information that appears inside the html code. all codes I want start with “1” and are 20 characters long. how can i collect this data from the html code and create a list? thanks
What does the html look like? It sounds like you will need to parse it but I can’t explain how to do that without seeing it.
Hello. the html contains private information that I don’t want to disclose. what I want is exactly what is shown in the topic below. but in the example it is only for one line of text, and what I intend to do is the same for 128 lines of which everyone starts with 1. Thanks
Some HELP??
That code is JSON. use the
Note:
I’m guessing you’ll want to do something like this but it’s impossible to know without seeing at least a sample (with private data modified):
well, this is the beginning of the html i intend to create a list of the selected items in green. the code contains dozens of them. and I know that they all start with 1 and have the same number of characters
I think the answer is probably in that link tatiang posted, but you’ll need to do some work to use it.
Is the rest of the page pretty constant? Content could change, but formatting is going to be rigidly the same? (If a computer is producing that output, that’s probably true. If a human is whacking at HTML to update the page, probably not.)
Look for what delimits the content you want (is it one per chunk that starts with span_id=“whatever’s under the red” ?) and use list splitting to split your content into chunks. Then parse each one, either by length (if the content you want is rigidly the same length) or by finding more delimiters for splitting it up.
The sample code above reads the html from community.thunkable.com and pulls out a list of categories. You can probably adapt it to get out those strings you want, IF the rest of the webpage is pretty consistently formatted.
Here’s the link, if you’d like to remix: Thunkable