Problem getting text from the web?

Hello guys, I want to extract the value of two stocks from one website. As an example I wrote BTCUSD and EURUSD. Actually I know how to pull data from the web, but something happened here that I don’t understand.

Below is a picture that I have listed (from 1 to 4). When I first click on the BTCUSD button, it does not fetch data. It brings the initial value “0”. But the second time I click it, it brings up the correct data. Then when I click on EURUSD, the same problem this time brings the previous data (BTCUSD). When I click on EURUSD a second time, it brings up the correct data. Then when I click on BTCUSD, it brings back the previous data (EURUSD) again. It goes on like this …

The code pictures below return the same result.

My question is: How do I get the right data to labels with every click?

You must wait for the web component got text first.

1 Like

Actually, I tried the clock component, and it didn’t happen. When BTCUSD is clicked, I made the clock enabled. Then I placed the codes into the clock, it still did not happen.

Is it convenient for you to show me the URL? Make it easy for me to make examples for you.

You are trying to consume the API.
You have set the url.
You did Get.
So, do as he @TianFeng081 suggested.
Within the Got event, get these values.

1 Like

This is an example that I can try my best to give you at present:

1 Like

No, I don’t use api. I’m just trying to get the required value from the website. Actually I’m getting. But on the second click. This is why I couldn’t understand it.

Well, my PHP scripts are in a url, and some of these scripts return a code or a value (Json format). I use web.url I use (it could be get) Afterwards, I, inside the Web.Got block (already suggested above), get the response content and use it within the app. Scripts bridge the gap between the app and the database … the “waiter” between the Client and The Kitchen …

Web.Get -> Web.Got

Hi @Rogerio_Rios

I also tried it with curl on my website. I tried to do something but I couldn’t. But I do not think there is a problem with the site.Because I can pull the data I want. There will be around 400-500 commodities.

No problem with the label, as in the picture. I don’t think there is a problem with the site. There seems to be a problem with my coding.

@TianFeng081 and @Rogerio_Rios Thanks for their interest. @TianFeng081 The problem that it placed in web got is solved. And of course, it was nice to add dictionary component elements into it.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.